router icon indicating copy to clipboard operation
router copied to clipboard

Provide a config to supress the 'Did you mean' message for GRAPHQL_VALIDATION_FAILED

Open zsolt-sb opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

Remove any ability to introspect for security reasons

Using the getting started server and providing the following operation:

query ExampleQuery {
  __type
  me {
    id
  }
}

We get the response (Note the did you mean message)

{
  "errors": [
    {
      "message": "Field \"__type\" argument \"name\" of type \"String!\" is required, but it was not provided.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "extensions": {
        "code": "GRAPHQL_VALIDATION_FAILED"
      }
    },
    {
      "message": "Field \"__type\" of type \"Query\" must have a selection of subfields. Did you mean \"__type { ... }\"?",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "extensions": {
        "code": "GRAPHQL_VALIDATION_FAILED"
      }
    }
  ]
}

Very recently the apollo server was given a config to disable this message.

Describe the solution you'd like

Would it be possible to provide a config to supress this message in the same way apollo server does?

Describe alternatives you've considered

We tried

supergraph:
  introspection: false

But this did not effect the message.

Additional context

Add any other context or screenshots about the feature request here.

zsolt-sb avatar Aug 27 '24 17:08 zsolt-sb