[Fixed]-Field \"createUaction\" of type \"CreateUaction\" must have a sub selection."

26👍

This is not an issue with your schema, but with how you’re making the request.

From the specification:

A selection set is primarily composed of fields. A field describes one discrete piece of information available to request within a selection set.

Some fields describe complex data or relationships to other data. In order to further explore this data, a field may itself contain a selection set, allowing for deeply nested requests. All GraphQL operations must specify their selections down to fields which return scalar values to ensure an unambiguously shaped response.

In other words, every field must resolve to a concrete value (like a scalar or enum). If a field resolves to an ObjectType, you have to request at least one of the fields of that type. The fields you select are called the subselection for that field.

The error indicates you are missing a subselection for the type CreateUaction. Your request should look more like this:

mutation SomeOperationName {
  createUaction {
    user {
      # one or more user fields
    }
  }
}

Leave a comment