public void ParseFacebookKitchenSinkSchema()
        {
            // arrange
            string schemaSource = FileResource.Open("schema-kitchen-sink.graphql");

            // act
            Parser       parser   = new Parser();
            DocumentNode document = parser.Parse(
                schemaSource, new ParserOptions(noLocations: true));

            // assert
            document.Snapshot();
        }
        public void ParseFacebookKitchenSinkQuery()
        {
            // arrange
            string querySource = FileResource.Open("kitchen-sink.graphql");

            // act
            Parser       parser   = new Parser();
            DocumentNode document = parser.Parse(
                querySource, new ParserOptions(
                    noLocations: true, allowFragmentVariables: true));

            // assert
            document.Snapshot();
        }
Esempio n. 3
0
        public void QueryWithComments()
        {
            // arrange
            string query = @"{
                hero {
                    name
                    # Queries can have comments!
                    friends {
                        name
                    }
                }
            }";

            // act
            DocumentNode document = Parser.Default.Parse(query,
                                                         new ParserOptions(noLocations: true));

            // assert
            document.Snapshot();
        }