neo4j-graphql-js
neo4j-graphql-js copied to clipboard
Any possibility of allowing multiple data sources soon?
I noticed it was in the goals, I'm beginning a new project and would love to consider neo4j rather than mongodb but don't want to have to create separate APIs that could more easily be RESTDataSource
s.
What I do is combine both with Federation, but then you cannot use an augmented schema.
Hey @partounian - currently you can add additional data sources by implementing those resolvers yourself. Just be sure to exclude any types that are not fetched in Neo4j either using the config or adding the @neo4j_ignore
directive to exclude these types from the generated Cypher queries.
Awesome! So I could use augmentedSchema, and an exclude any non-neo4j types?
Perfect.
On Tue, Jul 9, 2019, 9:55 AM William Lyon [email protected] wrote:
Hey @partounian https://github.com/partounian - currently you can add additional data sources by implementing those resolvers yourself. Just be sure to exclude any types that are not fetched in Neo4j either using the config https://grandstack.io/docs/graphql-schema-generation-augmentation.html#configuring-schema-augmentation or adding the @neo4j_ignore directive to exclude these types from the generated Cypher queries.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/neo4j-graphql/neo4j-graphql-js/issues/276?email_source=notifications&email_token=AATMQG56SREU5V7EEA4VQNDP6S7HDA5CNFSM4H7AGP5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZQ36QY#issuecomment-509722435, or mute the thread https://github.com/notifications/unsubscribe-auth/AATMQG2KKE5BOTXW2W73OT3P6S7HDANCNFSM4H7AGP5A .
You could also use schema forwarding, forwarding your Neo4j schema privately and then stitch them together and expose that publicly as your GraphQL api. The Neo4j bits will be taken care of by Neo4j-graphql and the other bits will be taken care of by whatever other service. You could have these all on the same instance to make network overhead zero.
@benjamin-rood Is there an example anywhere of the schema forwarding
technique you describe? Very interested in federation w/ neo4j
https://github.com/neo4j-graphql/neo4j-graphql-js/issues/608