author avatar

syedsibtain

Mon Jan 16 2023

Aliases in Graphql. Let’s say we have a query that return us the cars Data. If we add both the queries, we will get an error. Fields "cars" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional. UseCase Example: :point_down:This will throw error

{  
  cars(filter: "name = Cars") {
    edges {
      node {
        name
        speed        
      }
    }
  }
  cars {
    edges{
      node{
        name
      }
    }
  }
}