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

Support lists with a single value in NODE_ queries #14

Closed
vladar opened this issue Sep 28, 2020 · 1 comment
Closed

Support lists with a single value in NODE_ queries #14

vladar opened this issue Sep 28, 2020 · 1 comment

Comments

@vladar
Copy link
Contributor

vladar commented Sep 28, 2020

Some schemas do not provide any means to fetch a single node. Instead, they allow you to query a list of nodes by id (but returning a list with a single element). E.g.

query NODE_FOO {
  queryFoo(input: { id: $id }) {
    ...idFragment
  }
}

and the return value could be:

{
  data: {
    queryFoo: [ { id: 'foo' } ]
  }
}

The toolkit must support this and extract { id: 'foo' } as the node value. Right now it erroneously extracts [ { id: 'foo' } ] as a node value.

@vladar
Copy link
Contributor Author

vladar commented Sep 28, 2020

Fixed in 0.6.0

@vladar vladar closed this as completed Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant