GraphQL API: introspection limit is too restrictive #101382
Unanswered
BoD
asked this question in
API and Webhooks
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Product Feedback
Body
Context
For a GraphQL client to use a GraphQL API, it needs its schema. To do this, introspection is usually available, allowing the client to retrieve all types, fields, directives, etc., via an introspection query.
However, depending on the server's GraphQL capabilities, this introspection query could request for fields that are not supported (e.g.
specifiedByURL
introduced in 2021), which will result in errors.To alleviate this issue, a client can execute a "pre-introspection" query first, to see which introspection features are supported by the server, and then craft a compatible introspection query.
This is what Apollo Kotlin does.
Issue
This pre-introspection query fails on GitHub's server, with
INTROSPECTION_LIMIT_EXCEEDED
:This is disappointing, especially since this version of the query, which results in a much bigger response, is allowed:
If the introspection fields limit could be changed from 2 to 5, the more optimized version would work on GitHub.
Beta Was this translation helpful? Give feedback.
All reactions