Skip to the content.

< Back


IGraphQLField

Namespace: GraphQL.Query.Builder

The GraphQL field interface.

public interface IGraphQLField

Attributes NullableContextAttribute

Properties

Name

Gets the query name.

string Name { get; }

Property Value

String

AliasName

Gets the alias name.

string? AliasName { get; }

Property Value

String

Directives

Gets the directives attached to the field.

List<GraphQLDirective> Directives { get; }

Property Value

List<GraphQLDirective>

Methods

BuildSelectionSet()

Builds the field selection set, without the enclosing braces.

string BuildSelectionSet()

Returns

String
The GraphQL selection set as string.

Build()

Builds the query.

string Build()

Returns

String
The GraphQL query as string, without outer enclosing block.

Exceptions

ArgumentException
Must have a ‘Name’ specified in the Query

ArgumentException
Must have a one or more ‘Select’ fields in the Query


< Back