You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 16.x we are no longer getting the description returned as expected. I've put together a small test case.
This works fine with 15.x
importassertfrom'assert';import{parse,TypeInfo,validate,visit,visitWithTypeInfo}from'graphql';import{makeExecutableSchema}from'@graphql-tools/schema';// schemas as defined by serverconstschema=makeExecutableSchema({typeDefs: ['type Notification {',' # some description',' id: ID','}','type Query { Notification: Notification }'].join('\n'),parseOptions: {commentDescriptions: true}});// ast as defined by queryconstast=parse('query Notification { Notification { id } }');// making sure everything is fineconsterrors=validate(schema,ast);assert(errors.length===0);// the actually changed behavior belowconsttypeInfo=newTypeInfo(schema);visit(ast,visitWithTypeInfo(typeInfo,{enter(node,key,parent,path,ancestors){constfieldDef=typeInfo.getFieldDef();if(fieldDef?.name==='id'){console.log([key,fieldDef?.description]);}}}));// => [ 0, 'some description' ]// => [ 'name', 'some description' ]
but with 16.x we are getting back
// => [ 0, undefined ]// => [ 'name', undefined ]
The text was updated successfully, but these errors were encountered:
In version 16.x we are no longer getting the description returned as expected. I've put together a small test case.
This works fine with 15.x
but with 16.x we are getting back
The text was updated successfully, but these errors were encountered: