question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to run a mutation? Add example to Readme

See original GitHub issue

I can query just fine, but I’m having a hard time figuring out the correct format for mutations. Here’s a screenshot of what I’m playing with:

https://www.dropbox.com/s/4g0r4ii3z3u7zir/Screenshot 2015-12-16 10.58.25.png?dl=0

Basically I’m just not sure of the correct format for setting up the ChangeCohortInput but I remember seeing someone else do it by making that as a variable in the Query Variables section.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

115reactions
sarinkcommented, Oct 9, 2018

If you’re like me, you simply missed the sneaky “variables” input box (bottom left corner):

screen shot 2018-10-09 at 5 08 59 pm screen shot 2018-10-09 at 5 09 10 pm
47reactions
tinnoucommented, Jan 11, 2016

Let say your ChangeCohortInput has the fields clientMutationId and title.

Your mutation would look like:

mutation example($cohort: ChangeCohortInput!){
  change_cohort(input: $cohort) {
    user {
      cohort {
        title
      }
    }
  }
}

and variables

{
  "cohort": {
    "clientMutationId": "random",
    "title": "New cohort title"
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

spectaql - npm
Supports blacklisting entire areas (e.g. "don't show Mutations") and 1-off blacklisting. Supports providing examples via static metadata, or ...
Read more >
/graphql - Lime Go API
Mutations are used to perform certain actions and alter objects. The examples below are quite simple, regarding the request body. In production you'll...
Read more >
Documentation for graphql-relay (0.12.0) - RubyDoc.info
To define a mutation, use GraphQL::Relay::Mutation.define . Inside the block, you should configure: name , which will name the mutation field & derived...
Read more >
graphql_flutter | Flutter Package - Pub.dev
For more in-depth details on the graphql API, see the graphql README ... In order to use the client, your Query and Mutation...
Read more >
aws-cdk/aws-appsync module - AWS Documentation
Example of a GraphQL API with AWS_IAM authorization resolving into a DynamoDb ... To add fields for these mutations, we can simply run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found