-
-
Notifications
You must be signed in to change notification settings - Fork 748
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed collisions of aliases in projections (#3614)
- Loading branch information
1 parent
99fa769
commit ac6d865
Showing
5 changed files
with
185 additions
and
3 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
11 changes: 11 additions & 0 deletions
11
...sts.ExecuteAsync_Should_ProjectAndPage_When_AliasIsSameAsAlwaysProjectedField_Result.snap
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,11 @@ | ||
{ | ||
"data": { | ||
"books": { | ||
"nodes": [ | ||
{ | ||
"authorId": "BookTitle" | ||
} | ||
] | ||
} | ||
} | ||
} |
133 changes: 133 additions & 0 deletions
133
...sts.ExecuteAsync_Should_ProjectAndPage_When_AliasIsSameAsAlwaysProjectedField_Schema.snap
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,133 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
"The node interface is implemented by entities that have a global unique identifier." | ||
interface Node { | ||
id: ID! | ||
} | ||
|
||
type Author { | ||
id: Int! | ||
name: String | ||
books: [Book!]! | ||
} | ||
|
||
type Book implements Node { | ||
id: ID! | ||
authorId: Int! | ||
title: String | ||
author: Author | ||
} | ||
|
||
"A connection to a list of items." | ||
type BookConnection { | ||
"Information to aid in pagination." | ||
pageInfo: PageInfo! | ||
"A list of edges." | ||
edges: [BookEdge!] | ||
"A flattened list of the nodes." | ||
nodes: [Book!] | ||
} | ||
|
||
"An edge in a connection." | ||
type BookEdge { | ||
"A cursor for use in pagination." | ||
cursor: String! | ||
"The item at the end of the edge." | ||
node: Book! | ||
} | ||
|
||
"Information about pagination in a connection." | ||
type PageInfo { | ||
"Indicates whether more edges exist following the set defined by the clients arguments." | ||
hasNextPage: Boolean! | ||
"Indicates whether more edges exist prior the set defined by the clients arguments." | ||
hasPreviousPage: Boolean! | ||
"When paginating backwards, the cursor to continue." | ||
startCursor: String | ||
"When paginating forwards, the cursor to continue." | ||
endCursor: String | ||
} | ||
|
||
type Query { | ||
node(id: ID!): Node | ||
books(first: Int after: String last: Int before: String where: BookFilterInput order: [BookSortInput!]): BookConnection | ||
} | ||
|
||
input AuthorFilterInput { | ||
and: [AuthorFilterInput!] | ||
or: [AuthorFilterInput!] | ||
id: ComparableInt32OperationFilterInput | ||
name: StringOperationFilterInput | ||
books: ListFilterInputTypeOfBookFilterInput | ||
} | ||
|
||
input AuthorSortInput { | ||
id: SortEnumType | ||
name: SortEnumType | ||
} | ||
|
||
input BookFilterInput { | ||
and: [BookFilterInput!] | ||
or: [BookFilterInput!] | ||
id: ComparableInt32OperationFilterInput | ||
authorId: ComparableInt32OperationFilterInput | ||
title: StringOperationFilterInput | ||
author: AuthorFilterInput | ||
} | ||
|
||
input BookSortInput { | ||
id: SortEnumType | ||
authorId: SortEnumType | ||
title: SortEnumType | ||
author: AuthorSortInput | ||
} | ||
|
||
input ComparableInt32OperationFilterInput { | ||
eq: Int | ||
neq: Int | ||
in: [Int!] | ||
nin: [Int!] | ||
gt: Int | ||
ngt: Int | ||
gte: Int | ||
ngte: Int | ||
lt: Int | ||
nlt: Int | ||
lte: Int | ||
nlte: Int | ||
} | ||
|
||
input ListFilterInputTypeOfBookFilterInput { | ||
all: BookFilterInput | ||
none: BookFilterInput | ||
some: BookFilterInput | ||
any: Boolean | ||
} | ||
|
||
input StringOperationFilterInput { | ||
and: [StringOperationFilterInput!] | ||
or: [StringOperationFilterInput!] | ||
eq: String | ||
neq: String | ||
contains: String | ||
ncontains: String | ||
in: [String] | ||
nin: [String] | ||
startsWith: String | ||
nstartsWith: String | ||
endsWith: String | ||
nendsWith: String | ||
} | ||
|
||
enum SortEnumType { | ||
ASC | ||
DESC | ||
} | ||
|
||
"The `@defer` directive may be provided for fragment spreads and inline fragments to inform the executor to delay the execution of the current fragment to indicate deprioritization of the current fragment. A query with `@defer` directive will cause the request to potentially return multiple responses, where non-deferred data is delivered in the initial response and data deferred is delivered in a subsequent response. `@include` and `@skip` take precedence over `@defer`." | ||
directive @defer("If this argument label has a value other than null, it will be passed on to the result of this defer directive. This label is intended to give client applications a way to identify to which fragment a deferred result belongs to." label: String "Deferred when true." if: Boolean) on FRAGMENT_SPREAD | INLINE_FRAGMENT | ||
|
||
"The `@stream` directive may be provided for a field of `List` type so that the backend can leverage technology such as asynchronous iterators to provide a partial list in the initial response, and additional list items in subsequent responses. `@include` and `@skip` take precedence over `@stream`." | ||
directive @stream("If this argument label has a value other than null, it will be passed on to the result of this stream directive. This label is intended to give client applications a way to identify to which fragment a streamed result belongs to." label: String "The initial elements that shall be send down to the consumer." initialCount: Int! "Streamed when true." if: Boolean!) on FIELD |