Skip to content

Commit

Permalink
[test] Make green
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Jun 5, 2019
1 parent 0af981e commit 300723f
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 100 deletions.
Expand Up @@ -12,7 +12,7 @@ query TestQuery($date: String) {
ERROR:
NormalizationCodeGenerator: Complex argument values (Lists or InputObjects with nested variables) are not supported.
Source: GraphQL request (2:17)
Source: GraphQL request:2:17
1: query TestQuery($date: String) {
2: items(filter: {date: $date}) {
^
Expand Down
Expand Up @@ -3364,31 +3364,31 @@ THROWN EXCEPTION:
Error: Found a circular reference from fragment 'Profile'.
Source (derived): GraphQL request (2:1)
Source (derived): GraphQL request:2:1
1: # expected-to-throw
2: fragment RefetchableFragment on Query @refetchable(queryName: "RefetchableFragmentQuery") @argumentDefinitions(id: {type: "ID!"}) {
^
3: node(id: $id) {
Source (derived): GraphQL request (2:1)
Source (derived): GraphQL request:2:1
1: # expected-to-throw
2: fragment RefetchableFragment on Query @refetchable(queryName: "RefetchableFragmentQuery") @argumentDefinitions(id: {type: "ID!"}) {
^
3: node(id: $id) {
Source: GraphQL request (7:7)
Source: GraphQL request:7:7
6: name
7: ...Profile @arguments(includeProfile: true)
^
8: }
Source: GraphQL request (21:9)
Source: GraphQL request:21:9
20: node {
21: ...Profile
^
22: }
Source: GraphQL request (21:9)
Source: GraphQL request:21:9
20: node {
21: ...Profile
^
Expand Down Expand Up @@ -5091,13 +5091,13 @@ THROWN EXCEPTION:
Error: Encountered 1 error(s):
- Found conflicting @module selections: use a unique alias on the parent fields.
Source: GraphQL request (22:7)
Source: GraphQL request:22:7
21: ...MarkdownUserNameRenderer_name
22: @module(name: "BarMarkdownUserNameRenderer.react")
^
23: }
Source: GraphQL request (13:7)
Source: GraphQL request:13:7
12: ...MarkdownUserNameRenderer_name
13: @module(name: "FooMarkdownUserNameRenderer.react")
^
Expand Down Expand Up @@ -5951,13 +5951,13 @@ THROWN EXCEPTION:
Error: Encountered 1 error(s):
- Found conflicting @module selections: use a unique alias on the parent fields.
Source: GraphQL request (25:7)
Source: GraphQL request:25:7
24: ...MarkdownUserNameRenderer_name
25: @module(name: "BarMarkdownUserNameRenderer.react")
^
26: }
Source: GraphQL request (13:7)
Source: GraphQL request:13:7
12: ...MarkdownUserNameRenderer_name
13: @module(name: "FooMarkdownUserNameRenderer.react")
^
Expand Down Expand Up @@ -11396,13 +11396,13 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Variable @arguments values are only supported when the argument is defined with @argumentDefinitions. Check the definition of fragment 'ProfilePhoto'.
GraphQL request (16:36)
GraphQL request:16:36
15: __typename
16: ...ProfilePhoto @arguments(size: $size)
^
17: }
GraphQL request (19:1)
GraphQL request:19:1
18:
19: fragment ProfilePhoto on User {
^
Expand Down
Expand Up @@ -15,7 +15,9 @@ const RelayFindGraphQLTags = require('../RelayFindGraphQLTags');

describe('RelayFindGraphQLTags', () => {
function find(text, absPath: string = '/path/to/FindGraphQLTags.js') {
return RelayFindGraphQLTags.find(FindGraphQLTags.find, text, absPath);
return RelayFindGraphQLTags.find(FindGraphQLTags.find, text, absPath).map(
tag => tag.template,
);
}

describe('query parsing', () => {
Expand Down
Expand Up @@ -16,7 +16,7 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Expected definition for variable '$size' to be an object with the shape: '{type: string, defaultValue?: mixed}.
GraphQL request (4:9)
GraphQL request:4:9
3: id: {type: "ID"}
4: size: {type: "[Int]", defaultValu: [100]} # uh-oh, typo
^
Expand Down Expand Up @@ -932,7 +932,7 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Invalid directives @match found on FRAGMENT_DEFINITION. Source: document \`Example\` file: \`GraphQL request\`
GraphQL request (2:26)
GraphQL request:2:26
1: # expected-to-throw
2: fragment Example on User @match(key: "Example"){
^
Expand All @@ -955,13 +955,13 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Invalid directives @module, @match found on QUERY. Source: document \`TestQuery\` file: \`GraphQL request\`
GraphQL request (2:27)
GraphQL request:2:27
1: # expected-to-throw
2: query TestQuery($id: ID!) @module @match{
^
3: foo: node(id: $id) {
GraphQL request (2:35)
GraphQL request:2:35
1: # expected-to-throw
2: query TestQuery($id: ID!) @module @match{
^
Expand Down Expand Up @@ -990,7 +990,7 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Invalid directives @module found on FIELD. Source: document \`Example\` file: \`GraphQL request\`
GraphQL request (6:24)
GraphQL request:6:24
5: node {
6: profilePicture @module(preset: $preset) {
^
Expand Down Expand Up @@ -1178,23 +1178,23 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 3 error(s):
- Expected a value matching type 'PhotoSize'.
GraphQL request (4:28)
GraphQL request:4:28
3: me {
4: profilePicture(preset: "LARGE") { # error: string not enum
^
5: uri
- Expected a value matching type 'PhotoSize'.
GraphQL request (12:28)
GraphQL request:12:28
11: me {
12: profilePicture(preset: 128) { # error: int not enum
^
13: uri
- Expected a value matching type 'PhotoSize'.
GraphQL request (20:28)
GraphQL request:20:28
19: me {
20: profilePicture(preset: [LARGE]) { # error: list of enum, not enum
^
Expand Down Expand Up @@ -2786,13 +2786,13 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Variable '$environment' was defined as type 'Environment!' but used in a location expecting the type '[Environment!]!'
GraphQL request (9:53)
GraphQL request:9:53
8:
9: fragment ChildFragment on User @argumentDefinitions(environment: {type: "Environment!"}){
^
10: # variables of a non-list type cannot flow into list types,
GraphQL request (12:26)
GraphQL request:12:26
11: # the singular -> list promotion only works for literal values
12: checkins(environments: $environment) { # expected error
^
Expand Down Expand Up @@ -3848,13 +3848,13 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Literal @arguments values are only supported when the argument is defined with @argumentDefinitions. Check the definition of fragment 'ChildFragment'.
GraphQL request (3:44)
GraphQL request:3:44
2: fragment ParentFragment on User {
3: ...ChildFragment @arguments(pictureSize: 42) # error: $pictureSize not defined
^
4: }
GraphQL request (6:1)
GraphQL request:6:1
5:
6: fragment ChildFragment on User {
^
Expand All @@ -3881,13 +3881,13 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Variable @arguments values are only supported when the argument is defined with @argumentDefinitions. Check the definition of fragment 'ChildFragment'.
GraphQL request (3:44)
GraphQL request:3:44
2: fragment ParentFragment on User {
3: ...ChildFragment @arguments(pictureSize: $querySize) # error: $pictureSize not defined
^
4: }
GraphQL request (6:1)
GraphQL request:6:1
5:
6: fragment ChildFragment on User {
^
Expand Down Expand Up @@ -3921,7 +3921,7 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Invalid use of @uncheckedArguments_DEPRECATED: all arguments are defined, use @arguments instead.
GraphQL request (12:10)
GraphQL request:12:10
11: }
12: ...Foo @uncheckedArguments_DEPRECATED(localId: $id)
^
Expand Down Expand Up @@ -5048,23 +5048,23 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 3 error(s):
- Expected a value matching type 'String'.
GraphQL request (4:10)
GraphQL request:4:10
3: route(waypoints: [{
4: lat: 0.0 # error: float not string
^
5: lon: "0.0"
- Expected a value matching type 'WayPoint!'.
GraphQL request (14:21)
GraphQL request:14:21
13: query LiteralListArgumentQuery2 {
14: route(waypoints: ["waypoint"]) { # error: string not input object
^
15: steps {
- Expected a value matching type 'WayPoint!'.
GraphQL request (22:20)
GraphQL request:22:20
21: query LiteralListArgumentQuery3 {
22: route(waypoints: "waypoint") { # error: string not list
^
Expand Down Expand Up @@ -5228,23 +5228,23 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 3 error(s):
- Uknown field 'unknownField' on type 'CheckinSearchInput'.
GraphQL request (4:5)
GraphQL request:4:5
3: checkinSearchQuery(query: {
4: unknownField: "Facebook" # error: unknown field
^
5: }) {
- Expected a value matching type 'String'.
GraphQL request (12:12)
GraphQL request:12:12
11: checkinSearchQuery(query: {
12: query: FACEBOOK # error: enum not string
^
13: }) {
- Expected a value matching type 'CheckinSearchInput'.
GraphQL request (19:29)
GraphQL request:19:29
18: query LiteralObjectArgument3 {
19: checkinSearchQuery(query: FACEBOOK) { # error: enum not object
^
Expand Down Expand Up @@ -5390,7 +5390,7 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Expected a value matching type 'ID!'.
GraphQL request (3:24)
GraphQL request:3:24
2: query NullValuesQuery {
3: node_id_required(id: null) {
^
Expand Down Expand Up @@ -5862,7 +5862,7 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Unknown type: 'UnknownType'.
GraphQL request (2:22)
GraphQL request:2:22
1: # expected-to-throw
2: query TestQuery($id: UnknownType) {
^
Expand All @@ -5874,13 +5874,13 @@ exports[`RelayParser should error when parsing fragment that references undeclar
"RelayParser: Encountered 1 error(s):
- Variable '$id' was used in locations expecting the conflicting types 'ID' and 'Int'. Source: document \`TestFragment\` file: \`GraphQL request\`
GraphQL request (2:14)
GraphQL request:2:14
1: fragment TestFragment on Query {
2: node(id: $id) {
^
3: id
GraphQL request (5:18)
GraphQL request:5:18
4: }
5: task(number: $id) {
^
Expand Down
Expand Up @@ -171,7 +171,7 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Expected a value matching type 'Environment!'.
GraphQL request (3:26)
GraphQL request:3:26
2: fragment UserFragment on User {
3: checkins(environments: "WEB") {
^
Expand Down Expand Up @@ -215,7 +215,7 @@ THROWN EXCEPTION:
Error: RelayParser: Encountered 1 error(s):
- Expected a value matching type 'Environment!'.
GraphQL request (3:26)
GraphQL request:3:26
2: fragment UserFragment on User {
3: checkins(environments: UNKNOWN_ENUM_VALUE) {
^
Expand Down

0 comments on commit 300723f

Please sign in to comment.