Class: GraphQL::VariableDefinition

Inherits:
Node
  • Object
show all
Defined in:
ext/graphql_parser/graphql_ruby.c

Instance Method Summary collapse

Instance Method Details

#default_valueObject



137
138
139
140
141
142
# File 'ext/graphql_parser/graphql_ruby.c', line 137

static VALUE variable_definition_get_default_value(VALUE self) {
  struct GraphQLAstVariableDefinition *node;
  TypedData_Get_Struct(self, struct GraphQLAstVariableDefinition, &variable_definition_type, node);
  if (GraphQLAstVariableDefinition_get_default_value(node) == NULL) return Qnil;
  return TypedData_Wrap_Struct(value_class, &value_type, (void*)GraphQLAstVariableDefinition_get_default_value(node));
}

#typeObject



131
132
133
134
135
# File 'ext/graphql_parser/graphql_ruby.c', line 131

static VALUE variable_definition_get_type(VALUE self) {
  struct GraphQLAstVariableDefinition *node;
  TypedData_Get_Struct(self, struct GraphQLAstVariableDefinition, &variable_definition_type, node);
  return TypedData_Wrap_Struct(type_class, &type_type, (void*)GraphQLAstVariableDefinition_get_type(node));
}

#variableObject



125
126
127
128
129
# File 'ext/graphql_parser/graphql_ruby.c', line 125

static VALUE variable_definition_get_variable(VALUE self) {
  struct GraphQLAstVariableDefinition *node;
  TypedData_Get_Struct(self, struct GraphQLAstVariableDefinition, &variable_definition_type, node);
  return TypedData_Wrap_Struct(variable_class, &variable_type, (void*)GraphQLAstVariableDefinition_get_variable(node));
}