Improve and test compatibility with GraphQLJSON
See original GitHub issueHi! I’m trying to use apollo-client
with GraphQLJSON.
Using the below mutation
I am able to send the correct data to GraphQL. The problem arise when I try to query for data that includes settings
(e.g. the response from this mutation). I get TypeError: Cannot read property 'selections' of null at writeSelectionSetToStore
. It works if settings
is null. It also works fine in the /graphql
query app.
function mapMutationsToProps({ ownProps, state }) {
return {
updateClub: (variables) => ({
mutation: gql`
mutation updateClub(
$uid: String!
$name: String!
$settings: JSON!
) {
updateClub(
uid: $uid
name: $name
settings: $settings
) {
uid,
name,
settings
}
}
`,
variables: variables,
})
}
}
Any help would be greatly appreciated 😄 🌈
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
E2E Testing json-graphql-server using Cypress
This blog post explains how Cypress.io test runner can test an application that uses GraphQL to load / save data on the server....
Read more >Custom scalars - Apollo GraphQL Docs
The serialize method converts the scalar's back-end representation to a JSON-compatible format so Apollo Server can include it in an operation response.
Read more >Spring for GraphQL Documentation
To get started, check the Spring GraphQL starter on start.spring.io ... which works well since in GraphQL Java a subscription response is a ......
Read more >Optimizing APIs by Design. REST, GraphQL, JSON:API, oh my!
REST, GraphQL, JSON:API, oh my! When creating an API to expose some ... As such, it enjoys really great compatibility and huge adoption....
Read more >GraphQL.SystemTextJson 7.2.1 - NuGet
Test code Build artifacts Publish code CodeQL analysis codecov ... https://graphql.org/learn - learn about GraphQL, how it works, and how to use it....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@stubailo works like a charm! Thanks a bunch ❤️ 🌈 🚀
Published in NPM as
0.3.8
, let me know if it works for you!