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

The inline argument "perPage" is expected as a variable but was not provided. #1183

Closed
ivan133 opened this issue Jan 16, 2017 · 8 comments
Closed
Labels

Comments

@ivan133
Copy link

ivan133 commented Jan 16, 2017

Hi, guys.
I'm using apollo-client: 0.5.21 and graph.cool
I'm trying to get a list of guest to render it in table component (GuestsList)
I have this query:

export default graphql(allGuestsQuery, {
  options(ownProps) {
    return {
      // returnPartialData: true,
      variables: {
        filter: ownProps.filter,
        perPage: PER_PAGE_ITEMS,
        skip: 0,
        orderBy: DEFAULT_ORDER
      }
    };
  }})(GuestsList)

But when the page loads for the first time I got an error.
http://joxi.ru/l2ZnRMeIwzJNl2

The inline argument "perPage" is expected as a variable but was not provided.

Maybe this issue is connected with this one, but for me, it's looks like it's not
#732

When I updated apollo-client to version 0.5.26 all works, but unfortunately I can't do it because this bug #1129

@ivan133
Copy link
Author

ivan133 commented Jan 16, 2017

I "Network" tab I can see that "perPage" is actually passed in request.
http://joxi.ru/a2XaZDOt1w8gVA

@curio77
Copy link

curio77 commented Jan 19, 2017

Looks related to (my) #1163, too. Testing this now, I too see things going back and forth between the client and the GraphQL backend as expected, but still the error gets thrown and my component gets no data.

@calebmer
Copy link
Contributor

Could you see if this is fixed by #1174?

@ivan133
Copy link
Author

ivan133 commented Jan 24, 2017

@calebmer Sorry I didn't get it.
What version of apollo-client should I check?

@calebmer
Copy link
Contributor

Should be in 0.8.0 @ivan133 👍

@ivan133
Copy link
Author

ivan133 commented Jan 25, 2017

@calebmer yes, looks it work. Although it also worked on 0.5.26.
The main issue for update was this #1129
I'll check if it resolved on 0.8.0 later this week.

@ivan133 ivan133 closed this as completed Jan 25, 2017
@thebigredgeek
Copy link
Contributor

This is still a major bug. I am running 0.8.7 and have encountered it. Looks like it happens if I SSR a page that uses a variable, navigate away from that page, and then navigate back to it via the back button. It does NOT happen if I SSR a different page, navigate to the page, navigate away, and then navigate back. It appears like it might have something to do a difference in query presentation during SSR?

@calebmer
Copy link
Contributor

@thebigredgeek could you reproduce your error with react-apollo-error-template? It would go a long way in helping us debug the issue since we could really use some more information.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants