import { Kind , DefinitionNode , DocumentNode , OperationDefinitionNode , OperationTypeNode , NameNode , VariableDefinitionNode , SelectionSetNode , SelectionNode , FieldDefinitionNode , FieldNode , ListTypeNode , TypeNode , NonNullTypeNode , NamedTypeNode , VariableNode , ValueNode , ArgumentNode , } from "graphql" ; export const document = ( definitions ) : DocumentNode => ( { kind : Kind . DOCUMENT , definitions , } ) ; export const operationDefinition = ( operation , selectionSet , name , variableDefinitions ) : OperationDefinitionNode => ( { kind : Kind . OPERATION_DEFINITION , operation , selectionSet , name , variableDefinitions , } ) ; export const selectionSet = ( selections ) : SelectionSetNode => ( { kind : Kind . SELECTION_SET , selections , } ) ; export const field = ( name , optionalValues = { } ) : FieldNode => ( { kind : Kind . FIELD , name , ... optionalValues , } ) ; export const listType = ( type ) : ListTypeNode => ( { kind : Kind . LIST_TYPE , type , } ) ; export const nonNullType = ( type ) : NonNullTypeNode => ( { kind : Kind . NON_NULL_TYPE , type , } ) ; export const variableDefinition = ( variable , type ) : VariableDefinitionNode => ( { kind : Kind . VARIABLE_DEFINITION , variable , type , } ) ; export const variable = ( name ) : VariableNode => ( { kind : Kind . VARIABLE , name , } ) ; export const name = ( value ) : NameNode => ( { kind : Kind . NAME , value , } ) ; export const namedType = ( name ) : NamedTypeNode => ( { kind : Kind . NAMED_TYPE , name , } ) ; export const argument = ( name , value ) : ArgumentNode => ( { kind : Kind . ARGUMENT , name , value , } ) ;