-
Notifications
You must be signed in to change notification settings - Fork 184
Query has depth of 13, which exceeds max depth of 10 #290
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
Comments
gql will use an introspection query to get the schema from the backend only if You should try with |
Thanks, this seems* to help! Honestly, it's a while since I wrote the code and now I don't know why I had this set to * it throws a different error now, which I think isn't related to this issue, probably just to the upgrade to v3. I will come back to report if this really solves the problem. |
Probably because it is set to
We changed the way the introspection query is done in 3.0 (See the release notes for breaking changes) |
Thanks, that makes sense :) I just got it all working. The subsequent error was
This happened with code from gql import Client as Memberful, gql
from gql.transport.requests import RequestsHTTPTransport
...
transport = RequestsHTTPTransport(url='https://juniorguru.memberful.com/api/graphql/',
headers={'Authorization': f'Bearer {MEMBERFUL_API_KEY}'},
verify=True, retries=3)
memberful = Memberful(transport=transport)
...
result = memberful.execute(query, params) After digging into code of - result = memberful.execute(query, params)
+ result = memberful.execute(query, variable_values=params) This has made the error to go away. I didn't see this mentioned in the release notes, so I'm not sure whether this is intended behavior or not. That's also why I'm adding a comment here and not filing another issue. If you think this is intended, I'm fine with the change, but just wanted to let you know in case it's unexpected. |
I've updated the release notes for your last point. Thank you |
I'm using gql to fetch data from the Memberful API. After upgrading to v3, I get the following error:
I'm not really a GraphQL expert, but this is not a query I can see anywhere in my code. It looks like gql does this IntrospectionQuery on my behalf. I've learned the depth limitation is a common practice and it's something the backend (server) imposes on me, so it isn't anything I can influence myself.
Thus as I understand the situation, gql constructs a query the server refuses to execute and I can do nothing about it. That seems to me as a bug in the library, because v2 has worked with the same API and the same code.
To Reproduce
I'm sending the following query to the Memberful API:
Expected behavior
I get a result with data.
System info (please complete the following information):
The text was updated successfully, but these errors were encountered: