Questions tagged [graphql-mutation]
129 questions
0
votes
1 answer
Update cache after delete mutation Apollo vue
How do I update the cache for a query after a graphql mutation in Vue3 using the Composition Api? I have my vue setup in main.js like this:
import { createApp, provide, h } from "vue"
import App from "./App.vue"
import router from…

ccsv
- 8,188
- 12
- 53
- 97
0
votes
0 answers
How to return a string from a GraphQL mutation wrapped on restApi?
My restAPI POST call return a uuid string as result, like so:
246f97e8-cdc8-4b01-9881-19278be7e33d
This API is wrapped with GraphQL. The mutation I wrote for this post method works fine, I can see it gets triggered and return a 200 status.
The only…

intro__codes
- 172
- 9
0
votes
1 answer
Apollo/Graphql mutate array
I am trying to mutate an array in my Vue application via Apollo to my Graphql backend.
For example the array which I try to mutate is stored in my schema as:
type type1 {
property1: [BigInt]!
}
However, when I assign and pass a string to my…

Kilian Kramer
- 89
- 5
0
votes
1 answer
How to update relational types in Graphql
I am new to Graphql and I want to update relational types, but I have no idea how to do it.
My type definitions are as following:
type User {
email: String!
username: String!
password: String!
registered_at: Date!
role: String!
…

Kilian Kramer
- 89
- 5
0
votes
1 answer
Invalid input 'on': expected\n \"*\"\n \"]\"\n \"{\"\n \"|\"\n a parameter while creating mutations
I have created a neo4j graphql API which does CRUD operations and was trying to implement mutations but i am receiving this error and don't know why this is happening.
I am not facing any problem implementing mutations from this page. But when I…
0
votes
1 answer
How can I call mutation in GraphQL playground?
My schema looks like this within the yellow coloured square in the image below
And the code on the left side doesn't really work.
How can I call this in GraphQL playground?
Appreciate your answer in advance!

idhxx
- 45
- 5
0
votes
1 answer
Could not resolve any of the following components: [JsonGraphqlForm]
I'm working on an application where you can control your Ac, Lights, and Switches with this app. It builds on the expo framework but we create our own plugins in expo it's publically available. by using this you can create your own app in just a…

Talha Akbar
- 462
- 3
- 15
0
votes
1 answer
Updating model with GraphQL Mutation
I have been having trouble figuring out how to update a User with graphQL. The functionality I'm currently aiming for is for the user to be able to update their account/profile information. I have some things set up for the user like a bio field for…

james182
- 59
- 6
0
votes
1 answer
Saving an ID value from an API to a User with GraphQL
I'm working on a video game website where a user can save a game to a list. How this is supposed to work is when the user clicks "Complete Game", the ID of the game is saved to a state that holds the value. The value is then passed into the…

james182
- 59
- 6
0
votes
1 answer
Error to Execute a Mutation with GraphQL in Google App Script
I managed to use similar code below for query GraphQL using Google App Script.
However, it's not working when I changed to use on mutation (code below).
Error code is 400 with text: {"errors":[{"message":"GraphQL operations must contain a non-empty…

user8729759
- 3
- 1
- 2
0
votes
1 answer
How to mutate a list of objects in an array as an argument in GraphQL completely
I cannot mutate a list of objects completely, because only the last element of the array will be mutated.
What already works perfectly is, if I put each element ({play_positions_id: ...}) in the array manually like here:
mutation CreateProfile {
…

B0r1
- 400
- 3
- 15
0
votes
2 answers
Can we perform post/put/delete operations in GraphQL query?
I read somewhere that queries are only for Get request and can't handle Request body. But when I tried handling a mutation in query, it just worked! If that's so, what's the use of mutations then?
P.S. - Many websites say mutations can be used to…

Min Yoongi
- 396
- 5
- 16
0
votes
1 answer
Flutter No Material widget found
i want to use mutation graphql in flutter.
but i've got this massage and i cant load my code.
this is my code:
import 'package:flutter/material.dart';
import 'package:graphql_flutter/graphql_flutter.dart';
void main() => runApp(MyApp());
class…
user16886755
0
votes
1 answer
How to make a GraphQL update mutation?
I'm new to GraphQL. I've got a schema and mutation for adding data, but I'm a bit stuck on how to make an update mutation to update existing data on the database.
I think I know what I might need to do to achieve this, but I'd appreciate some…

user14593966
- 151
- 1
- 14
0
votes
1 answer
Can't place GraphQL custom type as a Postman variable
Has anyone had luck with placing a GraphQL custom type argument as a Postman or Graphql variable? I'm kinda spinning in circles right now, I hope a fresh pair of eyes could point me in the right direction.
What I'm trying to do is to send a mutation…

Nikola Pepic
- 11
- 2