dotansimha / graphql-yoga

🧘 Rewrite of a fully-featured GraphQL Server with focus on easy setup, performance & great developer experience. The core of Yoga implements WHATWG Fetch API and can run/deploy on any JS environment.
https://the-guild.dev/graphql/yoga-server
MIT License
8.21k stars 569 forks source link

Setting `maskedErrors` to `true` in `development` mode has no effect #3330

Open kireerik opened 3 months ago

kireerik commented 3 months ago

Describe the bug

See the title.

Your Example Website or App

Steps to Reproduce the Bug or Issue

Do what the title says.

Expected behavior

The setting is respected.

Screenshots or Videos

No response

Platform

Additional context

No response

n1ru4l commented 3 months ago

Can you please explain in detail what you expect to happen? An example GraphQL response of what you get today, and what you expect instead with the setting set to true?

kireerik commented 3 months ago

Sure. Let's say i throw an error like this (in a GraphQl query):

throw Error('test')

This is what I get as a response: Unexpected error. on errors[0].message (This is as expected.)

errors[0].extensions(.originalError (with the relevant details on it in message and stack))

I expect to get no extensions at all (in this case) but more impotantly no originalError on it (in this case).