I have validation error for graphql query

Advertisements

My query

query MyQuery($resourceId: ID) {
  resource(id: resourceId) { name }
}

I have an error: Field "resourceId" argument "id requires type ID found ID.

>Solution :

trying

query MyQuery($resourceId: ID) {
  resource(id: $resourceId) { name }
}

Leave a ReplyCancel reply