node.js - How to organize nodeDefinition for GraphQL Server as separate files for schema? -


i have set graphql server nodejs , separated graphql schema definitions in separate files type, mutations, query , subscriptions.

|-graphqlschema  |-mutations  |-queries  |-types 

now i'm trying add nodedefitions make server relay compatible 1 client. i'm not sure on file place nodedefinitions.

if creating nodedefinition separated file, assume below problems:

  1. nodeinterface of nodedefinition have use resolver code of 1 in query file. (redundant codes)
  2. if connectiontypes defined, nodedefinition has import types , types inturn has import nodedefinition (inter-dependency).

any thoughts on organising graphql schema files modularity appreciated.

the working code available in github repo


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -