-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c079ae3
commit 84689d1
Showing
6 changed files
with
165 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Copyright (c) 2015-present, Facebook, Inc. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery { | ||
whoever123is: node(id: [123, 456]) { | ||
id | ||
... on User @onInlineFragment { | ||
field2 { | ||
id | ||
alias: field1(first: 10, after: $foo) @include(if: $foo) { | ||
id | ||
...frag @onFragmentSpread | ||
} | ||
} | ||
} | ||
... @skip(unless: $foo) { | ||
id | ||
} | ||
... { | ||
id | ||
} | ||
} | ||
} | ||
|
||
mutation likeStory @onMutation { | ||
like(story: 123) @onField { | ||
story { | ||
id @onField | ||
} | ||
} | ||
} | ||
|
||
subscription StoryLikeSubscription($input: StoryLikeSubscribeInput) | ||
@onSubscription { | ||
storyLikeSubscribe(input: $input) { | ||
story { | ||
likers { | ||
count | ||
} | ||
likeSentence { | ||
text | ||
} | ||
} | ||
} | ||
} | ||
|
||
fragment frag on Friend @onFragmentDefinition { | ||
foo( | ||
size: $site | ||
bar: 12 | ||
obj: { | ||
key: "value" | ||
block: """ | ||
block string uses \""" | ||
""" | ||
} | ||
) | ||
} | ||
query teeny { | ||
unnamed(truthy: true, falsey: false, nullish: null) | ||
query | ||
} | ||
query tiny { | ||
__typename | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
|
||
const { parse } = require('graphql/language/parser.js'); | ||
const { print } = require('graphql/language/printer.js'); | ||
const { bigDocument } = require('./fixtures') | ||
|
||
const document = parse(bigDocument) | ||
|
||
module.exports = { | ||
name: 'Print ktichen-sink query', | ||
count: 1000, | ||
measure() { | ||
print(document); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.