RisingStack / graffiti

⚠️ DEVELOPMENT DISCONTINUED - Node.js GraphQL ORM
https://risingstack-graffiti.signup.team/
MIT License
1.01k stars 44 forks source link

Combine multiple scheme sources? #14

Closed jontonsoup closed 9 years ago

jontonsoup commented 9 years ago

I have a use case where I'm using a hand built schema (which talks to other APIs) and a graffiti mongoose schema. I'd like to be able to combine them into one endpoint. Is this possible at the moment?

Thanks, Jon

tothandras commented 9 years ago

@jontonsoup In the latest graphql-js release there is a function just for this. I couldn't try it out myself, but it promises what you are requesting.

jontonsoup commented 9 years ago

@tothandras awesome! I'll take a look at that.

tothandras commented 9 years ago

@jontonsoup Let me know how it works! ;)

jontonsoup commented 9 years ago

@tothandras did a quick check -- seems like my schema is incompatible with the graffiti generated one (although I'm not sure why). They don't merge properly.

It seems like its not designed to merge two schemas directly if you look at the chatter on the PR.

tothandras commented 9 years ago

@jontonsoup I see. I was expecting it to be more powerful. Then we can add the option to pass in fields to getSchema. Would you like to add fields to query or types?