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

Queries fails with missingValue error all time after Apollo migration to 1.x version #2975

Closed
serbancoroiu opened this issue Apr 22, 2023 · 9 comments · Fixed by #2983
Closed
Assignees
Labels
question Issues that have a question which should be addressed

Comments

@serbancoroiu
Copy link

serbancoroiu commented Apr 22, 2023

Question

I am trying to update the Apollo dependency for one of my projects from 0.53.0 to 1.x and I have some issues with it.
For schema management and code generation I have used apollo-ios-cli.

After updating my classes to fix some errors generated by different type names or missing ApolloAPI import the project is building & running again, but each time when I'm calling any query it ends up with the following error:

GraphQLExecutionError(path: __typename, underlying: ApolloAPI.JSONDecodingError.missingValue)

After I've looked into it a bit deeper, I've found that backend is returning data as needed but the app throws an error in the JSONResponseParsingInterceptor, on the parseResult method. No matter what type of cachePolicy I'm using, it always throws an error from both parseResult and parseResultFast` methods.

Query example:

query GetAppConfigs {
  result: app_config {
 		key
    value
    type
  }
}

Any idea?

@serbancoroiu serbancoroiu added the question Issues that have a question which should be addressed label Apr 22, 2023
@calvincestari calvincestari added this to the Patch Releases (1.1.x) milestone Apr 24, 2023
@florianschulz
Copy link

florianschulz commented Apr 25, 2023

Seeing the same issue after updating from 1.0.5 to 1.1.2 (ApolloAPI.JSONDecodingError.missingValue) for all queries.

@nickradford
Copy link

Had same issue here, downgrading to 1.0.5 resolved the issue.

@calvincestari
Copy link
Member

We've got @BobaFetters actively looking into this issue, we'll update as soon as we know more - thanks.

@BobaFetters
Copy link
Member

The fix for this has been merged into main and will go out with the next release

@psdevss
Copy link

psdevss commented May 18, 2023

The fix for this has been merged into main and will go out with the next release

Hi, good day. Tried it in 1.3, in what version is it fix. Thanks!

@BobaFetters
Copy link
Member

@psdevss This was fixed in the 1.1.3 release

@psdevss
Copy link

psdevss commented May 18, 2023

Ahh quick question, why in my query and generating. __typename is always there for every object. Actually trying it in our mockserver and json response works if __typename is added on each object

@BobaFetters
Copy link
Member

@psdevss not 100% clear what you are asking, this issue and #2955 were caused by __typename being added to root field types when using custom names for the root fields (Query, Mutation, Subscription), other types should have __typename generated for them. If you are experiencing an issue I would recommend opening a new issue and providing detailed information on how to reproduce the issue like in #2955

@psdevss
Copy link

psdevss commented May 19, 2023

@psdevss not 100% clear what you are asking, this issue and #2955 were caused by __typename being added to root field types when using custom names for the root fields (Query, Mutation, Subscription), other types should have __typename generated for them. If you are experiencing an issue I would recommend opening a new issue and providing detailed information on how to reproduce the issue like in #2955

Thanks. #3030. Created this question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issues that have a question which should be addressed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants