chroma/lexers/testdata/graphql.expected
2025-03-22 20:46:00 +13:00

171 lines
7.1 KiB
Text

[
{"type":"KeywordDeclaration","value":"query"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"Hero"},
{"type":"Punctuation","value":"("},
{"type":"NameVariable","value":"$episode"},
{"type":"Punctuation","value":":"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"Episode"},
{"type":"Punctuation","value":","},
{"type":"TextWhitespace","value":" "},
{"type":"NameVariable","value":"$withFriends"},
{"type":"Punctuation","value":":"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"Boolean"},
{"type":"Punctuation","value":"!)"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"hero"},
{"type":"Punctuation","value":"("},
{"type":"NameProperty","value":"episode"},
{"type":"Punctuation","value":":"},
{"type":"TextWhitespace","value":" "},
{"type":"NameVariable","value":"$episode"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameClass","value":"name"},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"friends"},
{"type":"TextWhitespace","value":" "},
{"type":"NameDecorator","value":"@include"},
{"type":"Punctuation","value":"("},
{"type":"NameProperty","value":"if"},
{"type":"Punctuation","value":":"},
{"type":"TextWhitespace","value":" "},
{"type":"NameVariable","value":"$withFriends"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameClass","value":"name"},
{"type":"TextWhitespace","value":"\n "},
{"type":"KeywordDeclaration","value":"..."},
{"type":"NameProperty","value":"frag"},
{"type":"TextWhitespace","value":"\n\n "},
{"type":"KeywordDeclaration","value":"..."},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"inlineFrag"},
{"type":"TextWhitespace","value":"\n "},
{"type":"Punctuation","value":"}"},
{"type":"TextWhitespace","value":"\n "},
{"type":"Punctuation","value":"}"},
{"type":"TextWhitespace","value":"\n "},
{"type":"Punctuation","value":"}"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Punctuation","value":"}"},
{"type":"TextWhitespace","value":"\n\n"},
{"type":"KeywordDeclaration","value":"fragment"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"frag"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"on"},
{"type":"TextWhitespace","value":" "},
{"type":"NameProperty","value":"User"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"id"},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"name"},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"profilePic"},
{"type":"Punctuation","value":"("},
{"type":"NameProperty","value":"size"},
{"type":"Punctuation","value":":"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"50"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Punctuation","value":"}"},
{"type":"TextWhitespace","value":"\n\n"},
{"type":"Comment","value":"# Switching to schema"},
{"type":"TextWhitespace","value":"\n"},
{"type":"LiteralString","value":"\"Description for the type\""},
{"type":"TextWhitespace","value":"\n"},
{"type":"KeywordDeclaration","value":"type"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"MyObjectType"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"TextWhitespace","value":"\n "},
{"type":"LiteralString","value":"\"\"\"\n Description for field\n Supports **multi-line** description for your [API](http://example.com)!\n \"\"\""},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"myField"},
{"type":"Punctuation","value":":"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"String"},
{"type":"Punctuation","value":"!"},
{"type":"TextWhitespace","value":" "},
{"type":"NameDecorator","value":"@deprecated"},
{"type":"Punctuation","value":"("},
{"type":"NameProperty","value":"reason"},
{"type":"Punctuation","value":":"},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralString","value":"\"Use `newField`.\""},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":"\n\n "},
{"type":"NameClass","value":"otherField"},
{"type":"Punctuation","value":"("},
{"type":"TextWhitespace","value":"\n "},
{"type":"LiteralString","value":"\"Description for argument\""},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"arg"},
{"type":"Punctuation","value":":"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"Int"},
{"type":"TextWhitespace","value":"\n "},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Punctuation","value":"}"},
{"type":"TextWhitespace","value":"\n\n"},
{"type":"KeywordDeclaration","value":"input"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"Foo"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"bar"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"["},
{"type":"NameProperty","value":"String"},
{"type":"Punctuation","value":"!]!"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"["},
{"type":"LiteralString","value":"\"baz\""},
{"type":"Punctuation","value":"]"},
{"type":"TextWhitespace","value":"\n"},
{"type":"Punctuation","value":"}"},
{"type":"TextWhitespace","value":"\n\n"},
{"type":"KeywordDeclaration","value":"directive"},
{"type":"TextWhitespace","value":" "},
{"type":"NameDecorator","value":"@deprecated"},
{"type":"Punctuation","value":"("},
{"type":"TextWhitespace","value":"\n "},
{"type":"NameProperty","value":"reason"},
{"type":"Punctuation","value":":"},
{"type":"TextWhitespace","value":" "},
{"type":"NameClass","value":"String"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"="},
{"type":"TextWhitespace","value":" "},
{"type":"LiteralString","value":"\"No longer supported\""},
{"type":"TextWhitespace","value":"\n"},
{"type":"Punctuation","value":")"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordDeclaration","value":"on"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordConstant","value":"FIELD_DEFINITION"},
{"type":"TextWhitespace","value":" "},
{"type":"Punctuation","value":"|"},
{"type":"TextWhitespace","value":" "},
{"type":"KeywordConstant","value":"ENUM_VALUE"},
{"type":"TextWhitespace","value":"\n"}
]