Skip to content

Instantly share code, notes, and snippets.

@bogdanned
Last active April 10, 2020 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdanned/226bb9b9f2cb8b3424afc2245c99f689 to your computer and use it in GitHub Desktop.
Save bogdanned/226bb9b9f2cb8b3424afc2245c99f689 to your computer and use it in GitHub Desktop.
// Simplified structure of the type map
let typeMap = {
rootType: {
fields: { // array with the fields of the root ype
user: {
type: {
fields: {
lastname: {...},
settings: {...},
}
},
resolve: () => ({}) // point to a resolve function for the type name
},
settings: {
type: {
fields: {
membership: {...},
}
},
resolve: () => ({}) // point to a resolve function for the type name
}
}
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment