public virtual GraphQLScalarTypeDefinition BeginVisitScalarTypeDefinition(GraphQLScalarTypeDefinition node) { if (node.Directives != null) { this.BeginVisitNodeCollection(node.Directives); } return(node); }
protected ScalarType Scalar(GraphQLScalarTypeDefinition definition) { if (!_builder.TryGetType <ScalarType>(definition.Name.Value, out var scalar)) { throw new ArgumentOutOfRangeException( $"Could not find scalar '{definition.Name.Value}' from known types. " + "Scalars require a value converter to function and cannot be created from SDL."); } return(scalar); }
private string PrintScalarTypeDefinition(GraphQLScalarTypeDefinition node) { var name = PrintName(node.Name); var directives = node.Directives?.Select(PrintDirective); return(Join(new[] { "scalar", name, Join(directives, " ") }, " ")); }
protected ScalarType Scalar(GraphQLScalarTypeDefinition definition) { _builder.GetScalar(definition.Name.Value, out var scalar); return(scalar); }