Skip to content

Selection set without entity fields returns an error response for GraphQL query and mutation #1463

@severussundar

Description

@severussundar

For the below query and mutations, an error response is returned

Query:

{
    book_by_pk(id: 1){
         __typename
     }
}

pk query bug

Mutation:

mutation {
     updatebook(id: 1, item: {title: "Another great book"}){
        __typename  
     }
}

Mutation bug

Root Cause:
The SELECT query is constructed without any column. This leads to failure at the database layer.

Since, there are no entity fields in the selection set, the flow should not go to the database layer.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggraphql

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions