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 customize the mutation field name for the request body?

See original GitHub issue

Let me know if you need more clarification, but essentially, I know that I am able to change the query or mutation name via adding an operationId value to the OpenAPI spec for various endpoints.

However, is there an equivalent for changing the argument name for a generated mutation?

mutation { customizedMutationName(generatedInputName: [JSON in request body]) }

Here, I would like to customize the value of generatedInputName to just be body.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
cellardocommented, Nov 1, 2019

@Alan-Cha I finally got around to making the edits needed to implement a new option that sets a generic arg name for mutation request bodies. I tried pushing up my local branch to remote in order to make a PR, but I am not able to.

I apologize if this is obvious, but what are the steps to create a new PR? Should I be forking this repo first?

1reaction
cellardocommented, Oct 24, 2019

Dope, will put it on my to-do list. I rarely do open-source work, so I would love to help out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Queries and Mutations - GraphQL
The field name returns a String type, in this case the name of the main hero ... set of arguments - the query...
Read more >
GraphQL schema basics - Apollo GraphQL Docs
Structuring a mutation. Like queries, mutations match the structure of your schema's type definitions. The following mutation creates a new Book and requests...
Read more >
How to Implement a GraphQL Mutation - StepZen
Create a Mutation Type ... The mutation performs a POST to https://api.sendgrid.com/v3/mail/send . You need to send the body through the postbody field...
Read more >
3. Adding mutations to your API - GraphQL Nexus
Your first mutation · Add an args property to the field definition to define its args. Keys are arg names and values are...
Read more >
How to add additional request body values to Apollo GraphQL ...
form.append("variables", JSON.stringify({ "input": { "name" ...
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