-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix(documentation): use correct query names in partial example #11625
fix(documentation): use correct query names in partial example #11625
Conversation
Correct name of query GET_DOG_QUERY_PARTIAL -> PARTIAL_GET_DOG_QUERY
@andreasottosson-polestar: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
✅ Deploy Preview for apollo-client-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Update name used in useSuspenseQuery
Hi Andreas! That's actually not the intention behind that example. The point of the example is to show that you can use This is export const GET_DOG_QUERY: TypedDocumentNode<
DogData,
Variables
> = gql`
query GetDog($id: String) {
dog(id: $id) {
id
name
breed
}
}
`; As there is nothing to change here, I'm going to close this PR - thank you for keeping an eye out for possible inconsistencies in the docs and filing a PR, though! |
@phryneas Thanks for clarifying. At first I did not change the GET_DOG_QUERY on line 276, should have left that one. But it was the first two queries in the Partial example code that I noticed at first. This part, are they not supposed to be the same? const PARTIAL_GET_DOG_QUERY: TypedDocumentNode<
PartialData,
Variables
> = gql`
query GetDog($id: String) {
dog(id: $id) {
id
name
}
}
`;
// Write partial data for Buck to the cache
// so it is available when Dog renders
client.writeQuery({
query: GET_DOG_QUERY_PARTIAL,
variables: { id: "1" },
data: { dog: { id: "1", name: "Buck" } },
}); |
Ah, good catch - |
Thank you again :) |
No problem at all :) Thank you! |
Correct name of query in example. These are supposed to be the same right?
GET_DOG_QUERY_PARTIAL -> PARTIAL_GET_DOG_QUERY