Example #1
0
 /// <summary>
 /// Given a GraphQL schema source, parses it into a SchemaDocument.
 /// Throws GraphQLError if a syntax error is encountered.
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static SchemaDocument ParseSchema(Source source, ParseOptions options = null)
 {
     var parser = new SchemaParser(source, options);
     return parser.ParseSchemaDocument();
 }
Example #2
0
        /// <summary>
        /// Given a GraphQL schema source, parses it into a SchemaDocument.
        /// Throws GraphQLError if a syntax error is encountered.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="options">The options.</param>
        /// <returns></returns>
        public static SchemaDocument ParseSchema(Source source, ParseOptions options = null)
        {
            var parser = new SchemaParser(source, options);

            return(parser.ParseSchemaDocument());
        }