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

GraphQLError Undefined location on exception #537

Closed
keletsomolefe opened this issue Jan 12, 2020 · 1 comment
Closed

GraphQLError Undefined location on exception #537

keletsomolefe opened this issue Jan 12, 2020 · 1 comment
Labels
link Relates to link functionality

Comments

@keletsomolefe
Copy link

Describe the bug
On a query with an exception, locations is set to null on 3.0.0-beta.3 this is because raw['locations'] gives Map of type Map<String, dynamic> while the code is checking for Map<String, int>

https://github.com/zino-app/graphql-flutter/blob/d17b57b52d3cb985a8c8d7025a242bbcddecabfb/packages/graphql/lib/src/exceptions/graphql_error.dart#L33

To Reproduce
Steps to reproduce the behavior:

  1. Create a query that will return you errors which have locations
  2. Check the query result's exception
  3. e.g. result.exception.graphqlErrors[0].locations, result is an instance of 'QueryResult'
@klavs klavs added the link Relates to link functionality label Feb 16, 2020
@micimize
Copy link
Collaborator

micimize commented Oct 7, 2020

This is outdated / likely solved by using gql_links in 4.0.0-beta.1 (#648)

@micimize micimize closed this as completed Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
link Relates to link functionality
Projects
None yet
Development

No branches or pull requests

3 participants