Skip to content
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

1 to 1 mapping with persistence schema ? #4

Open
tlvenn opened this issue Aug 5, 2015 · 1 comment
Open

1 to 1 mapping with persistence schema ? #4

tlvenn opened this issue Aug 5, 2015 · 1 comment

Comments

@tlvenn
Copy link

tlvenn commented Aug 5, 2015

Hi,

One of the greatest benefit of GraphQL is that it gives your application a strong typing system you can rely on but that graph does not have to map 1 for 1 with a given persistence engine. For example a given attribute in Graphql could come from a rating service while everything else is coming from Mongo.

It seems to me that right now, by trying to import the models from Mongo, we loose the ability to enhance or complement that GraphQL Schema so it can be more that just what our persistence engine is providing.

I think it's great if Graffiti can help so you dont have to repeat yourself twice on how you declare your schema but at the same time, it is equally important that graffiti gives us the opportunity to add stuff or override stuff in the GraphQL schema as well.

@hekike
Copy link

hekike commented Aug 6, 2015

@tlvenn I think it's a good idea however I don't see the right solution for that yet.
In graffiti-mongoose we already exposed to getting only the generated types instead of the whole schema.
I think it's a good step to a more flexible direction.
Please ping me if you have anything in your mind about the correct solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants