Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not get deprecated args and inputFields from GraphQL sources #5692

Open
sebastianmulders opened this issue Jul 17, 2023 · 0 comments
Open

Comments

@sebastianmulders
Copy link

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

Currently, graphql-mesh does not seem support retrieving deprecated arguments and inputFields from GraphQL sources. The issue appears to stem from the underlying introspection query not setting args(includeDeprecated: true). Consequently, there is no apparent way to pass this as an option. I've found this in graphql-js's getIntrospectionQuery(), where it sets inputValueDeprecation to be false by default. I'm not 100% sure this is the underlying issue though.

Describe the solution you'd like

I'd like to either have an option to set inputValueDeprecation to true, or somehow otherwise make it possible to get deprecated arguments and inputFields (and preferably the deprecationReason, too).

Describe alternatives you've considered

I did a thorough search through graphql-mesh, graphql-tools and graphql-js but could not find a way to set this or pass options otherwise. I think this'll need to be implemented on graphql-mesh.

Additional context

Try running the following introspection query on a GraphQL server. I think when includeDeprecated is not set, or set to false explicitly, the args are not part of the mesh's generated schema.

  __schema {
    queryType {
      fields {
        name
        args(includeDeprecated: true) {
          name
          isDeprecated
          deprecationReason
        }
      }
    }
  }
} 
@sebastianmulders sebastianmulders changed the title GraphQL Can not get deprecated args and inputFields from GraphQL sources Jul 17, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant