schema.json File contains the results of an introspection query, or query information > Conventionally this file is called schema.json Reference: https://www.apollographql.com/docs/ios/downloading-schema/
https://github.com/graphql/graphql-js/blob/master/src/language/lexer.js#L187 https://github.com/graphql/graphql-spec/issues/276 Reading implementation of lexer, it seems only `#` indicates comment.
Tokens Rules + Starts with operation definition keyword `query`. The next `User` is operation name. If `(` exists in just after `User`, variable definitions starts. It will end with `)`. Next `{` means the beginning of definition of SelectionSet ……
Type Variable Name value: id Name value: Int! VariableDefinitions VariableDefinition VariableDefinition Type Variable Name value: withEmail Name value: Boolean!
VariableDefinitions VariableDefinition VariableDefinition + schema.json GraphQLType GraphQLType Type Variable Name value: id Name value: Int! Type Variable Name value: withEmail Name value: Boolean!
Summary 1. AST from *.graphql. 2. IR from ast and schema.json. 3. .swift, .ts, .scala from IR 4. It seems .kt doesn’t use apollo-tooling. All implementations are in apollo-android.