Ejemplo n.º 1
0
        private string PrintField(GraphQLFieldInfo field, bool firstInBlock)
        {
            var type = field.GetGraphQLType(this.schema.SchemaRepository);

            return
                (PrintDescription(field, "  ", firstInBlock) +
                 $"  {field.Name}{this.PrintArguments(field.Arguments.Values, "  ")}: " +
                 $"{type}{PrintDeprecated(field)}");
        }
Ejemplo n.º 2
0
        private string PrintInputValue(GraphQLFieldInfo arg)
        {
            var argType        = arg.GetGraphQLType(this.schema.SchemaRepository) as GraphQLInputType;
            var argDeclaration = $"{arg.Name}: {argType}";

            if (arg.DefaultValue.IsSet)
            {
                argDeclaration += $" = {arg.DefaultValue.GetSerialized(argType, this.schema.SchemaRepository)}";
            }

            return(argDeclaration);
        }