Skip to content

IntrospectionQuery fails when dataMasking is enabled #1685

@jwatzman

Description

@jwatzman

Intended outcome:

When I open the developer tools in my app and then go to the "explorer" tab, I get an error:

Schema Introspection Failure
We couldn't parse your graphql schema, or building your schema failed. The expected format is either IntrospectionQuery or SDL string.

This causes the autocomplete and other nice features of the "explorer" tab not to work properly -- though executing a query works just fine if I manually compose one.

After some debugging, I'm pretty sure that the issue is due to my app's use of fragment / data masking -- I believe masked data is getting sent back to the client, which means that the data that it wants isn't actually there since the IntrospectionQuery uses fragments.

Changing my call to new ApolloClient in my app from dataMasking: true to dataMasking: false fixes the issue and allows autocomplete etc to work fine.

Actual outcome:

I'd expect the dev tools to work just fine whether or not my app uses data masking.

How to reproduce the issue:

Pass dataMasking: true as an argument to new ApolloClient.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox
  • Browser version: 141
  • Extension version: 4.18.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions