I can't seem to understand the error I am getting on my client application. I am subscribing to a graphql subscription and I am able to retrieve the updates but I am not being able to push the changes to the typescript array called "models:Mo...
I have a React app accessing GraphQL server with the Apollo Client (version 1.x). There is a server schema that looks like this.  type Query {   currentShop: Shop } type Shop {   id: ID!   name: String!   products: [Product!]!   ...etc }   I do have...
GitHub's new GraphQL API requires authentication with a token as the previous version. So, how do we add a 'Header' information into the HttpLink inside Apollo-Client?  const client = new ApolloClient({   link: new HttpLink({ uri: 'ht...
I have been reviewing the Apollo documentation but I do not see information of how to go about handling server errors in the Apollo client.  For example, suppose that the server either:     Times out    Becomes unreachable   Unexpectedly fails     Ho...
I am using the apollo-client library to query data from my Graphql server.  Some of the queries are sent to the server every 5 seconds through apollo polling ability.  Is there a generic way to add a custom header to all requests that are sent by my...
I'm using graphql + mysql + react-apollo and here's one of the graphql type for User table:  type User {   id: ID!   name: String! }   My issue with ID scalar type in graphql is that it is returned as a string when primary keys are int in mys...
I've been following the Apollo Client docs on local state.  I've implemented a very simple query of the client cache:  export const GET_USER_ACCOUNTS = gql`     query GetUserAccounts {         userAccounts @client         name @client     } `...
In my component, I have this code:  componentDidMount () {   // Setup subscription listener   const { client, match: { params: { groupId } } } = this.props   client.subscribe({     query: HOMEWORK_IN_GROUP_SUBSCRIPTION,     variables: { groupId },...
I have a React-Native app where I make requests to a GraphQL server. Everything works fine except I need a way to set the timeout on the request/client to 5 or 10 seconds. Currently the request takes a very long time before it times out (around 1 min...
I have an upsert query that gets triggered on either create or update. On update, Apollo integrates the result into the cache but on create it does not.  Here is the query:  export const UPSERT_NOTE_MUTATION = gql`   mutation upsertNote($id: ID, $bod...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.