-
Notifications
You must be signed in to change notification settings - Fork 162
Remove run first column #2769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove run first column #2769
Changes from all commits
78cfee4
0ce4faf
63818ae
4dc75d6
a75e607
e36b235
b048db9
5008aa7
d7368df
e5b53a5
f2bd09c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| "@neo4j/graphql": major | ||
| --- | ||
|
|
||
| `@cypher` directive now requires the parameter `columnName`. | ||
|
|
||
| This requires all cypher queries to be made with a valid alias that must be referred in this new parameter. | ||
|
|
||
| For Example: | ||
|
|
||
| **@neo4j/graphql@3** | ||
|
|
||
| ``` | ||
| @cypher(statement: "MATCH (i:Item) WHERE i.public=true RETURN i.name") | ||
| ``` | ||
|
|
||
| **@neo4j/graphql@4** | ||
|
|
||
| ``` | ||
| @cypher(statement: "MATCH (i:Item) WHERE i.public=true RETURN i.name as result", columnName: "result") | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,7 +182,7 @@ describe("makeAugmentedSchema", () => { | |
| } | ||
|
|
||
| type Query { | ||
| movies: [Movie!]! @cypher(statement: "") | ||
| movies: [Movie!]! @cypher(statement: "RETURN 5 as a", columnName: "a") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The examples in this file upset me, I really wish there was a way we could have Cypher queries like this without the aliasing.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, but none we could find :( |
||
| } | ||
| `; | ||
|
|
||
|
|
@@ -225,7 +225,7 @@ describe("makeAugmentedSchema", () => { | |
| name: String | ||
| } | ||
|
|
||
| interface ActedIn @cypher(statement: "RETURN rand()") { | ||
| interface ActedIn @cypher(statement: "RETURN rand() as rand", columnName: "rand") { | ||
| screenTime: Int | ||
| } | ||
| `; | ||
|
|
@@ -282,7 +282,7 @@ describe("makeAugmentedSchema", () => { | |
| } | ||
|
|
||
| interface ActedIn { | ||
| id: ID @cypher(statement: "RETURN id(this)") | ||
| id: ID @cypher(statement: "RETURN id(this) as id", columnName: "id") | ||
| roles: [String] | ||
| } | ||
| `; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳