schema.json
αʔόʔͰఆٛ͞ΕͨQueryใΛؚΉϑΝΠϧ
> Conventionally this file is called schema.json
Reference: https://www.apollographql.com/docs/ios/downloading-schema/
Slide 6
Slide 6 text
*.graphql
ΫΤϦఆٛϑΝΠϧ
Slide 7
Slide 7 text
schema.json
*.graphql
ʴ
Slide 8
Slide 8 text
schema.json
*.graphql
Token AST IR
→
Slide 9
Slide 9 text
Lexer
.graphql to Tokens
Slide 10
Slide 10 text
User.graphql
Slide 11
Slide 11 text
User.graphql
Tokens
query
User
(
$
id
email
@
include
…
AddressFragment
Debug
:
response
~~~~~
~~~~~
~~~~~
~~~~~
~~~~~
~~~~~
~~~~~
~~~~~
Slide 12
Slide 12 text
query User
(
$
@
…
AddressFragment
NAME
Kind Value
undefined
undefined
undefined
undefined
COMMENT Debug
Parse࣌ʹແࢹ͞ΕΔ
name
: undefined
VariableDefinition
Type
Variable
Name
value: string
Name
value: string
Slide 28
Slide 28 text
Type
Variable
Name
value: id
Name
value: Int!
VariableDefinitions
VariableDefinition VariableDefinition
Type
Variable
Name
value: withEmail
Name
value: Boolean!
Slide 29
Slide 29 text
VariableDefinitions
VariableDefinition VariableDefinition
+ schema.json
GraphQLType
GraphQLType
Type
Variable
Name
value: id
Name
value: Int!
Type
Variable
Name
value: withEmail
Name
value: Boolean!