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.

Insert mutation problem

See original GitHub issue

I am not able to make a mutaion and is getting the error:-

Message: field “todo_user” not found in type: ‘todos_insert_input’, Location: undefined, Path: undefined

Explorer :- image

export const addTodo = gql`
  mutation($objects: [todos_insert_input]) {
    insert_todos(objects: $objects) {
      affected_rows
    }
  }
`;


insert_todos({
        variables: {
          objects: [
            {
              todo_text: "12",
              todo_user: "oauth12"
            }
          ]
        }
,

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
elitancommented, Jun 21, 2020

I’m having the same problem even though the jwt is valid and the permissions line up. This error is baffling

There are three potential problems:

  1. JWT claims are not correct
  2. Permissions are not correct
  3. Bug in Hasura

I encourage you to double check 1. and 2.

3reactions
elitancommented, Mar 20, 2019

It is a common pattern with Hasura. If you try to update a field you do not have permission to, Hasura will return back that the field does not exists. Because for that particular role (in your front end client), the field does not exist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Insertion - National Human Genome Research Institute
An insertion, as related to genomics, is a type of mutation that involves the addition of one or more nucleotides into a segment...
Read more >
Postgres: Insert mutation | Hasura GraphQL Docs
Insert an object into Postgres using a mutation.
Read more >
DNA Replication and Causes of Mutation - Nature
Likewise, when strand-slippage replication errors are not corrected, they become insertion and deletion mutations. Much of the early research on strand-slippage ...
Read more >
Mutations in Apollo Client - Apollo GraphQL Docs
When a mutation's response is insufficient to update all modified fields in your cache (such as certain list fields), you can define an...
Read more >
Plasmid insert mutations - causes and ways to avoid?
I suspect the problem may not be the plasmid itself, but the actual sequence reaction. It may be the template was poor and...
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