You may try graphql-compose to unlock directives for TypeGraphQL and GraphQL Nexus.
import{SchemaComposer}from'graphql-compose';constschemaRaw=builSchemaWithNexusOrTypeGraphQL();constsc=newSchemaComposer(schemaRaw);sc.getOTC('User').setDirectives([{name:'key',args:{fields:'id'}}]);// modify types as you wish // https://graphql-compose.github.io/docs/api/ObjectTypeComposer.html#directive-methods// export only what you need for federation// https://github.com/graphql-compose/graphql-compose/releases/tag/v7.11.0consttypeDefs=sc.getSDL({include:['User','AndJustSomeAnotherEntity']});constresolvers=sc.getResolveMethods();resolvers.User.__resolveReference=(user)=>{returnfetchUserById(user.id)};resolvers.AndJustSomeAnotherEntity.__resolveReference=(entity)=>{returnfetchEntityById(entity.id)};constserver=newApolloServer({schema:buildFederatedSchema([{typeDefs,resolvers}])});
So with such approach you may pick only what you want and expose via apollo federation.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You may try
graphql-compose
to unlock directives forTypeGraphQL
andGraphQL Nexus
.So with such approach you may pick only what you want and expose via apollo federation.