Top "React-apollo" questions

React Apollo allows you to fetch data from your GraphQL server and use it in building complex and reactive UIs using the React framework.

Apollo Query with Variable

Just a basic apollo query request this.client.query({ query: gql` { User(okta: $okta){ id } }` }).then(result => { this.setState({…

graphql apollo react-apollo
How to pass variables to a GraphQL query?

Lets assume I have the following GraphQL query in React-Apollo const CurrentUserForLayout = gql` query CurrentUserForLayout($avatarID: Int!) { currentUser { avatar_url(…

reactjs react-apollo
Reset store after logout with Apollo client

I'm trying to reset the store after logout in my react-apollo application. So I've created a method called "logout" which …

reactjs apollo react-apollo apollo-client
GraphQLError: Syntax Error: Expected Name, found <EOF>

I got the above error on a graphql query, I am using apollo-react by the way and using the Query …

graphql react-apollo graphql-tag
Apollo GraphQl react. How to clear query cache for all variable combinations?

I am using apollo graphql in my react application. Say I have the following query: query ListQuery($filter: String!) { items(…

caching react-apollo
Unsubscribe subscription in Apollo Client

In my component, I have this code: componentDidMount () { // Setup subscription listener const { client, match: { params: { groupId } } } = this.props client.subscribe({ …

javascript reactjs apollo react-apollo apollo-client
Setting state in the Query component of react-apollo

So, I'm trying to set an initial state for an edit component that gets data from the server and now …

reactjs react-apollo
How to chain two GraphQL queries in sequence using Apollo Client

I am using Apollo Client for the frontend and Graphcool for the backend. There are two queries firstQuery and secondQuery …

graphql apollo react-apollo apollo-client graphcool
refetchQueries in Mutation Component of React Apollo Client is not working?

I have a <Query /> in my Home.js file Home.js <Query query={GET_TODOS_BY_PRODUCT} …

javascript reactjs graphql apollo react-apollo
Handling errors with react-apollo useMutation hook

I have been trying to get my head around this problem but haven't found a strong answer to it. I …

reactjs graphql react-apollo apollo-client