Hi, possibly related to #493
I got around to using the changes for this feature. They are compiling as expected, however now I am getting a runtime error.
My query looks like:
defineByDocumentFile
"../resource/minimal-github.graphql"
[gql|
query FetchRepoFile ($repoOwner: String!, $repoName: String!, $expression: String!) {
repository(name: $repoName, owner: $repoOwner) {
object(expression: $expression) {
... on Blob {
isTruncated
text
}
}
}
}
|]
You can see the schema I am using here https://github.com/AlistairB/morpheus-repro/blob/master/minimal-github.graphql .
The error I am getting: Error in $.data.repository.object: key \"__typename\" not found on object
Running this in the github graphql explorer, eg. this query:
query {
repository(name: "react", owner: "facebook") {
object(expression: "af219cc6e6c514099a667ffab4e2d80c5c0c1bcc:.nvmrc") {
... on Blob {
isTruncated
text
}
}
}
}
produces this response:
{
"data": {
"repository": {
"object": {
"isTruncated": false,
"text": "v12.16.2\n"
}
}
}
}
I can include __typename in the query and will get back in the response "__typename": "Blob" (via the github graphql explorer).
Adding __typename to the query that morpheus is using causes compile time errors eg. Error: \"cant find field DataInterface.
Is this enough info? If not I can set up a repro in https://github.com/AlistairB/morpheus-repro
Hi, possibly related to #493
I got around to using the changes for this feature. They are compiling as expected, however now I am getting a runtime error.
My query looks like:
You can see the schema I am using here https://github.com/AlistairB/morpheus-repro/blob/master/minimal-github.graphql .
The error I am getting:
Error in $.data.repository.object: key \"__typename\" not found on objectRunning this in the github graphql explorer, eg. this query:
produces this response:
{ "data": { "repository": { "object": { "isTruncated": false, "text": "v12.16.2\n" } } } }I can include
__typenamein the query and will get back in the response"__typename": "Blob"(via the github graphql explorer).Adding
__typenameto the query that morpheus is using causes compile time errors eg.Error: \"cant find field DataInterface.Is this enough info? If not I can set up a repro in https://github.com/AlistairB/morpheus-repro