Skip to the content.

< Back


GraphQLFragment

Namespace: GraphQL.Query.Builder

Represents a named GraphQL fragment.

public class GraphQLFragment

Inheritance ObjectGraphQLFragment
Attributes NullableContextAttribute, NullableAttribute

Properties

Name

Gets the fragment name.

public string Name { get; }

Property Value

String

TypeName

Gets the type name the fragment applies to.

public string TypeName { get; }

Property Value

String

Query

Gets the query containing the fragment’s field selections.

public IGraphQLField Query { get; }

Property Value

IGraphQLField

Constructors

GraphQLFragment(String, String, IGraphQLField)

Initializes a new instance of the GraphQLFragment class.

public GraphQLFragment(string name, string typeName, IGraphQLField query)

Parameters

name String
The fragment name.

typeName String
The type name the fragment applies to.

query IGraphQLField
The query containing the fragment’s field selections.

Exceptions

ArgumentException
The name or the type name is not a valid GraphQL name.


< Back