-
Notifications
You must be signed in to change notification settings - Fork 651
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codegen casts hardcoded values in queries to Strings regardless of type
Closes #841
- Loading branch information
Showing
41 changed files
with
600 additions
and
115 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
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
7 changes: 7 additions & 0 deletions
7
apollo-compiler/src/main/kotlin/com/apollographql/apollo/compiler/ir/Argument.kt
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,7 @@ | ||
package com.apollographql.apollo.compiler.ir | ||
|
||
data class Argument( | ||
val name: String, | ||
val value: Any, | ||
val type: String | ||
) |
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 |
---|---|---|
@@ -1 +1 @@ | ||
apollo-codegen version=0.18.3 | ||
apollo-codegen version=0.19.1 |
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
6 changes: 6 additions & 0 deletions
6
apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/TestOperation.graphql
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,6 @@ | ||
query TestQuery { | ||
reviews(episode: JEDI, starsInt: 10, starsFloat: 9.9) { | ||
stars | ||
commentary | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/TestOperation.json
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,74 @@ | ||
{ | ||
"operations": [ | ||
{ | ||
"filePath": "src/test/graphql/com/example/arguments_hardcoded/TestOperation.graphql", | ||
"operationName": "TestQuery", | ||
"operationType": "query", | ||
"rootType": "Query", | ||
"variables": [], | ||
"source": "query TestQuery {\n reviews(episode: JEDI, starsInt: 10, starsFloat: 9.9) {\n __typename\n stars\n commentary\n }\n}", | ||
"fields": [ | ||
{ | ||
"responseName": "reviews", | ||
"fieldName": "reviews", | ||
"type": "[Review]", | ||
"args": [ | ||
{ | ||
"name": "episode", | ||
"value": "JEDI", | ||
"type": "Episode!" | ||
}, | ||
{ | ||
"name": "starsInt", | ||
"value": 10, | ||
"type": "Int" | ||
}, | ||
{ | ||
"name": "starsFloat", | ||
"value": 9.9, | ||
"type": "Float" | ||
} | ||
], | ||
"isConditional": false, | ||
"isDeprecated": false, | ||
"deprecationReason": null, | ||
"fields": [ | ||
{ | ||
"responseName": "__typename", | ||
"fieldName": "__typename", | ||
"type": "String!", | ||
"isConditional": false | ||
}, | ||
{ | ||
"responseName": "stars", | ||
"fieldName": "stars", | ||
"type": "Int!", | ||
"isConditional": false, | ||
"description": "The number of stars this review gave, 1-5", | ||
"isDeprecated": false, | ||
"deprecationReason": null | ||
}, | ||
{ | ||
"responseName": "commentary", | ||
"fieldName": "commentary", | ||
"type": "String", | ||
"isConditional": false, | ||
"description": "Comment about the movie", | ||
"isDeprecated": false, | ||
"deprecationReason": null | ||
} | ||
], | ||
"fragmentSpreads": [], | ||
"inlineFragments": [] | ||
} | ||
], | ||
"fragmentSpreads": [], | ||
"inlineFragments": [], | ||
"fragmentsReferenced": [], | ||
"sourceWithFragments": "query TestQuery {\n reviews(episode: JEDI, starsInt: 10, starsFloat: 9.9) {\n __typename\n stars\n commentary\n }\n}", | ||
"operationId": "a6746506c2fb20405972e7e76920eec4aa2e5e02dc429cfbd1585a4f1787b0d9" | ||
} | ||
], | ||
"fragments": [], | ||
"typesUsed": [] | ||
} |
Oops, something went wrong.