We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related to #176, prisma/prisma#2429 (comment) and other.
Yes, i setted tracing: false and cacheControl: false options and this applyed.
This GraphQL server doesn’t support tracing. See the following page for instructions: https://github.com/apollographql/apollo-tracing
but aliases still not works.
Query:
query { galleries ( where:{ id: "ck2q3mf8y14p70a00h2p07gcs" } ){ files: Files ( first: 1 ){ id } } }
Result:
{ "data": { "galleries": [ { "files": null } ] } }
Debug:
Response from http://localhost:4466/stage/dev: { "galleries": [ { "files": [ { "id": "ck2q43wvf14tu0a00kdm283p0" } ] } ] }
For additions debuging i add custom resolvers:
resolvers: { ...resolvers, Query: { ...resolvers.Query, galleries: (source, args, ctx, info) => { return ctx.db.query.galleries(args, info); }, }, Gallery: { // If got files files: (source, args, ctx, info) => { const { files, } = source; console.log('files source', JSON.stringify(source, true, 2)); return files; }, // If got Files Files: (source, args, ctx, info) => { const { Files, } = source; console.log('Files source', JSON.stringify(source, true, 2)); const { schema, ...other } = info; console.log('Files info', JSON.stringify(other, true, 2)); return Files; }, }, },
Files source { "files": [ { "id": "ck2q43wvf14tu0a00kdm283p0" } ] } Files info { "fieldName": "Files", "fieldNodes": [ { "kind": "Field", "alias": { "kind": "Name", "value": "files", "loc": { "start": 62, "end": 67 } }, "name": { "kind": "Name", "value": "Files", "loc": { "start": 69, "end": 74 } }, "arguments": [ { "kind": "Argument", "name": { "kind": "Name", "value": "first", "loc": { "start": 75, "end": 80 } }, "value": { "kind": "IntValue", "value": "1", "loc": { "start": 82, "end": 83 } }, "loc": { "start": 75, "end": 83 } } ], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "name": { "kind": "Name", "value": "id", "loc": { "start": 93, "end": 95 } }, "arguments": [], "directives": [], "loc": { "start": 93, "end": 95 } } ], "loc": { "start": 85, "end": 101 } }, "loc": { "start": 62, "end": 101 } } ], "returnType": "[File!]", "parentType": "Gallery", "path": { "prev": { "prev": { "key": "galleries" }, "key": 0 }, "key": "files" }, "fragments": {}, "operation": { "kind": "OperationDefinition", "operation": "query", "variableDefinitions": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "name": { "kind": "Name", "value": "galleries", "loc": { "start": 4, "end": 13 } }, "arguments": [ { "kind": "Argument", "name": { "kind": "Name", "value": "where", "loc": { "start": 14, "end": 19 } }, "value": { "kind": "ObjectValue", "fields": [ { "kind": "ObjectField", "name": { "kind": "Name", "value": "id", "loc": { "start": 22, "end": 24 } }, "value": { "kind": "StringValue", "value": "ck2q3mf8y14p70a00h2p07gcs", "block": false, "loc": { "start": 26, "end": 53 } }, "loc": { "start": 22, "end": 53 } } ], "loc": { "start": 21, "end": 54 } }, "loc": { "start": 14, "end": 54 } } ], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "alias": { "kind": "Name", "value": "files", "loc": { "start": 62, "end": 67 } }, "name": { "kind": "Name", "value": "Files", "loc": { "start": 69, "end": 74 } }, "arguments": [ { "kind": "Argument", "name": { "kind": "Name", "value": "first", "loc": { "start": 75, "end": 80 } }, "value": { "kind": "IntValue", "value": "1", "loc": { "start": 82, "end": 83 } }, "loc": { "start": 75, "end": 83 } } ], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "name": { "kind": "Name", "value": "id", "loc": { "start": 93, "end": 95 } }, "arguments": [], "directives": [], "loc": { "start": 93, "end": 95 } } ], "loc": { "start": 85, "end": 101 } }, "loc": { "start": 62, "end": 101 } } ], "loc": { "start": 56, "end": 105 } }, "loc": { "start": 4, "end": 105 } } ], "loc": { "start": 0, "end": 107 } }, "loc": { "start": 0, "end": 107 } }, "variableValues": {} }
Data exists, and alias info exists:
"fieldNodes": [ { "kind": "Field", "alias": { "kind": "Name", "value": "files", "loc": { "start": 62, "end": 67 } }, "name": { "kind": "Name", "value": "Files", "loc": { "start": 69, "end": 74 } },
But resolver do not returns data correctly.
For workaround i added in resolver:
if(files !== undefined){ return files; }
but this is not cool.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Related to #176, prisma/prisma#2429 (comment) and other.
Yes, i setted tracing: false and cacheControl: false options and this applyed.
but aliases still not works.
Query:
Result:
Debug:
For additions debuging i add custom resolvers:
Result:
Data exists, and alias info exists:
But resolver do not returns data correctly.
For workaround i added in resolver:
but this is not cool.
The text was updated successfully, but these errors were encountered: