Skip to content

Single query for all fields #89

Open
@pdsmcgavin

Description

@pdsmcgavin

Is there a way to not use custom or selected queries and still get just 1 query for all fields instead of 1 query for every field with each field adding on.

return nestedType.fields.map((field) => {
        const createdField = getField(field, this.schema)
        if (createdField) {
          fields.push(createdField)
        }

        return createQuery({
          fields,
          queryHeader: queryHeader,
          isMutation,
          name,
          operationName,
          variables: this.arguments[query.name],
        })
      })

We end up with multiple queries like

user {
  firstName
}

user {
  firstName
  id
}

user {
  firstName
  id
  lastName
}

Can there be an option to only return the query with all fields please?

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