Skip to content

Error: `Fields "book" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional. #2390

@bappajubcse05

Description

@bappajubcse05

I am trying to fetch all the records from a table/entity book and the books created by me using a graphQL query:

{  
  book(filter: "user ==Thomas") {
    edges {
      node {
        name        
      }
    }
  }
  book {
    edges{
      node{
        name
      }
    }
  }
}

But it is throwing below error:

Fields "book" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional.

I am not sure how I can retrieve these details using a single query. If I need to use alias, how can I define the aliases in the query?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions