Class: SelectionSet

SelectionSet(typeBundle, type, builderFunction)

Class that specifies the full selection of data to query.

Constructor

new SelectionSet(typeBundle, type, builderFunction)

This constructor should not be invoked directly. SelectionSets are created when building queries/mutations.

Parameters:
Name Type Description
typeBundle Object

A set of ES6 modules generated by graphql-js-schema.

type Object | String

The type of the current selection.

builderFunction function

Callback function used to build the SelectionSet. The callback takes a SelectionSetBuilder as its argument.

Source:

Methods

toString() → {String}

Returns the GraphQL query string for the SelectionSet (e.g. { cat { name } }).

Source:
Returns:

The GraphQL query string for the SelectionSet.

Type
String