-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
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
Enhancement/graphql custom resolvers and typedefs #509
Enhancement/graphql custom resolvers and typedefs #509
Conversation
let customDataDefs = ''; | ||
module.exports = (compilation) => { | ||
const { graph } = compilation; | ||
const uniqueCustomDataDefKeys = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming / organization could maybe some have thought here, just so it's clearer what everything is and where it is coming from. (from greenwood, from user, from user content, etc)
module.exports = (compilation) => { | ||
const { graph } = compilation; | ||
const uniqueCustomDataDefKeys = {}; | ||
const customSchemasPath = `${compilation.context.userWorkspace}/data/schema`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is great for unique queries for each individual user. If you want to extend it to have plugins include schema, we would need to do an additional directory walk of any plugins containing a graphql flag of somekind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good for individual users wanting to BYOQ(bring your own query) because now they can write custom resolvers and utilize the graph in many different ways. The gallery, as an example, is fine. But would like to confine the gallery typedefs + resolver + query + wrapper component to its own plugin package eventually.
f51f001
to
7de013b
Compare
Related Issue
resolves #508
Summary of Changes
TODO
Maybe for [RFC] External Data (Graph) Sources #21 , it could be more about how to get things into the graph specifically?- updated