We can make some requests to the server using both Query and Mutation. In these queries we can pass some params and we will get some results from the server in both cases. The only one obligatory difference is that we can call the mutation from our props like "this.props.mutation", but it looks like a syntax sugar, because we can wrap our HOC in "withApollo" and we'll receive "query" method in props too. So what is the main difference between these two types of requests?
difference between Query and Mutation in Apollo?
1.1k Views Asked by Zheka Dzecina At
1
There are 1 best solutions below
Related Questions in APOLLO
- Error creating bean with name 'routerFunctionMapping' defined in class path resource
- Apollo GraphQL Kotlin Codegen Fragment Serializable
- Choosing Backend for Multilingual E-commerce with Nuxt 3, MongoDB, GraphQL
- Apollo call API which provides all of a type, reducing duplicate calls when resolving individuals
- Pagination does not work in Apollo React Native
- GraphQL query in React for Sorare data (running locally)
- Context is undefined in Apollo RESTDataSource
- Apollo query subscription doesn't have extensions part in Error
- React front end not reaching graphQL resolver
- Wrong data is given from Apollo cache to React because of missing ids
- How to handle multiple api endpoints for apollo iOS
- Apollo headers not found parsing in Node.js
- When sending data to the database an error occurs [ApolloError: VALIDATION_ERROR]
- Apollo is returning data wrong, but is correct in Network inspector
- Call one query and wait for it to finish before calling another one
Related Questions in REACT-APOLLO
- How to properly catch a canceled request using Apollo Client library
- GraphQL query giving error, but it still updates my database
- GraphQL query in React for Sorare data (running locally)
- Issue with passing "locale" variable in Apollo useQuery and Strapi v4
- Apollo client, merges objects when 'id' propery is empty
- Not All Lazy Queries Polling when using Apollo
- apollo graphql subscription firing two times
- Custom and dynamic headers for different queries React.js Apollo
- Make GraphQL query or mutation arguments a bit more DRY
- Apollo client stopPolling not working after package bump
- Nextjs 13 page router - query response is null after updating invalid access token on a server(ssr)
- how to implement instant comments and replies using graphql apollo
- Implementing Apollo Client for Subscriptions in Next.js
- Unsafe array destructuring of a tuple element with an `any` value using Apollo useQuery
- Uncaught (in promise) ApolloError: Response not successful: Received status code 400
Related Questions in APOLLO-CLIENT
- Error: Response not successful: Received status code 405
- App expo uses useQuery to connect to graphql server, it works in development and when generating apk it works on Android 7 but not on Android 11 or +
- Dealing with Null Values in GraphQL API Response
- Using Apollo client wrapper in Next.js 14 App router
- Upload file in GraphQL and apollo-server
- How to set variables to context.extensions object when execute query?
- React GraphQL mutation is not leaving the loading state
- Apollo GraphQL Kotlin Codegen Fragment Serializable
- GraphQL query in React for Sorare data (running locally)
- GraphQL apollo caching query that has no id
- Wrong data is given from Apollo cache to React because of missing ids
- Getting Bad Request from graphql call
- Call one query and wait for it to finish before calling another one
- Issue with passing "locale" variable in Apollo useQuery and Strapi v4
- Apollo client, merges objects when 'id' propery is empty
Related Questions in APOLLO-SERVER
- Error: Response not successful: Received status code 405
- Issue querying related data in Apollo Server 4 with Prisma Schema
- Using Apollo client wrapper in Next.js 14 App router
- Upload file in GraphQL and apollo-server
- Unable to run apollo server from React project
- Running apollo Server for Next.js app giving error
- GraphQL query giving error, but it still updates my database
- Apollo call API which provides all of a type, reducing duplicate calls when resolving individuals
- How to redirect to Apollo GraphQL Sandbox from NestJS app in local?
- Keep running other functions after return in GraphQL resolvers
- Can anybody provide a practical example of fastify4 + @apollo/server v4 + @fastify/websocket and Redis for gql subscriptions
- Mixing Apollo v3 and v4 GraphQL in a federated graph
- Next auth not working properly using Apollo graphql
- `context` function not executing NextJs / Apollo / GraphQL
- Why server no restarting after error in validation
Related Questions in APOLLOSTACK
- How can I make managed federation work offline?
- Handling invalid or non-existent sub-references in Apollo server responses
- Why when I upload file with apollo-server the file is uploaded but the file is 0kb?
- How to delete cache record from Apollo GraphQL client with readQuery and writeQuery
- Apollo typepolicies how to read sibling field of Query?
- How to pass the Header while calling the Apollo Query?
- Preventing: Store reset while query was in flight (not completed in link chain)
- How to write extended types from an Apollo federated schema to its database?
- How to setup Apollo Gateway with managed federation?
- GraphQL: Field Resolver Not Firing on Subscription Query?
- Automatic persisted query in Apollo Client and Server is not working getting PERSISTED_QUERY_NOT_FOUND error
- Apollo Server - Confusion about cache/datasource options
- apollo-client: How to get inverse relation from cache?
- ApolloError.js:43 Uncaught (in promise) Error: Network error: Cannot read property 'Mutation' of undefined
- How to refetch a query from a different component without a mutation?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Strictly speaking there is no difference.
However, the reference implementation does enforce the following.
Both quotes can be found from the links below.
http://graphql.org/learn/queries/#mutations
http://graphql.org/learn/queries/#multiple-fields-in-mutations