After I'm sending a createMessage mutation in my app, I want to update the local ApolloStore using updateQueries.  My setup looks as follows:  const ChatWithAllMessages = graphql(allMessages, {name: 'allMessagesQuery'})(Chat) export defau...
I am in the process of learning graphql and react-apollo. I have set up a search query in my code. I am unsure how to pass a variable from my code (i.e. this.state.search) to my grapnql call.  I have looked at many answers including this one, but it...
I have a <Query /> in my Home.js file  Home.js  <Query       query={GET_TODOS_BY_PRODUCT}       variables={{ id: state.get("selectedProduct.id"), completed: true }}     >       {({ data: { product } }) => {         return <M...
A very strange one here, so if anybody can shed light on it I will be impressed.   Good  When I use a <h1 /> inside a component and build the server with npm run dev everything will work as expected.  I can replace the h1 with the <Query /&g...
I have a mutation like  mutation deleteRecord($id: ID) {     deleteRecord(id: $id) {         id     } }   and in another location I have a list of elements.   Is there something better I could return from the server, and how should I update the list?...
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'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 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...
I have a component that displays search data returned from the Spotify API. However, every time I update the state the UI flickers:   Input:              <DebounceInput                 debounceTimeout={300}                 onChange={handleChange}...
I've been trying to understand this GraphQL subscription issue for way too long at this point, I'd really like some help. What I'm trying to understand, when you set up the subscription using subscribeToMore with the Apollo react hook in...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.