-
Notifications
You must be signed in to change notification settings - Fork 122
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
Issue with new {args.id} style #134
Comments
Same issue. Just got undefined using the new {args.id} style. |
Great catch @karensg @haipengz -- This is a key priority for me, but I got interrupted yesterday before being able to fully test these changes. @karensg While your syntax should work (and it's a bug that it doesn't), I intended the api to be used slightly differently.
I consider this a my second immediate top priority, but I'm fighting fires at work, so I won't get to it till the afternoon. In general, I appreciate any help you guys can provide, you can find me in the ApolloGraphQL slack in the #apollo-link-rest room. One thing that would be really useful / speed up my fix would be some code for unit tests for each case that you're using, so I can make sure it works for you going forwards. |
Fixed in v0.4.1: https://github.com/apollographql/apollo-link-rest/releases/tag/v0.4.1 Please let me know if you're still seeing it! |
@fbartho Thanks for the fixes! It now works for my use case. |
Thanks again! ...
const GET_DOG_IMAGES_BY_BREED = gql`
query breeds ($breed: String!) {
imagesByBreed(breed: $breed) @rest(
type: "imagesByBreedResult"
path: "breed/{args.breed}/images"
endpoint: "dogApi"
) {
status
message
}
}
`
...
<Query query={GET_DOG_IMAGES_BY_BREED}
notifyOnNetworkStatusChange
variables={{ breed: 'hound' }}
>
{({ refetch, error, data, networkStatus, }) => {
expect(error).toBeUndefined()
expect(data).toBeDefined()
}}
</Query>
... |
Hi,
Just updated the library and have issues upgrading. Without any changes the functionality works as expected with a warning to migrate to the new style. When I make the needed changes like below I get that both {args} and {args.name} are undefined. Here is the code:
Am i missing something?
The text was updated successfully, but these errors were encountered: