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

Fragments support #15

Closed
2 tasks done
gyzerok opened this issue Jul 29, 2015 · 12 comments
Closed
2 tasks done

Fragments support #15

gyzerok opened this issue Jul 29, 2015 · 12 comments

Comments

@gyzerok
Copy link
Contributor

gyzerok commented Jul 29, 2015

  • Inline fragments support
  • External fragments support
@gyzerok
Copy link
Contributor Author

gyzerok commented Jul 29, 2015

I'm going to investigate in external fragments support and come with PR.

@hekike
Copy link
Contributor

hekike commented Jul 29, 2015

Ok thanks!

@hekike hekike modified the milestone: fragment support Jul 29, 2015
@gyzerok
Copy link
Contributor Author

gyzerok commented Jul 30, 2015

Waiting answer on the issue graphql/graphql-js#96 in GraphQL.js.

@hekike
Copy link
Contributor

hekike commented Jul 30, 2015

@gyzerok ok cool. I refactored the project structure, so please check it before start implementing something: https://github.com/RisingStack/graffiti-mongoose/tree/master/src

@gyzerok
Copy link
Contributor Author

gyzerok commented Jul 31, 2015

@hekike nice work! But I'm suggesting to use a little bit different file names. For example projection.js can be named getProjection.js. It's less confusing and this naming style is being used now in most repos as far as I know. Same with the schema.js - getSchema.js and etc.

@gyzerok
Copy link
Contributor Author

gyzerok commented Jul 31, 2015

Also I think it would be nice to split core and utilitary modules. Core modules in our case seems to be those which implements a graffiti adapter interface and are directly connected to scheme generation while getProjection is just an util. So I propose to create 2 dirs in src/ (core/ and utils/) and split code between them. What do you think about this?

@gyzerok
Copy link
Contributor Author

gyzerok commented Jul 31, 2015

_P.S.:_ Or mb better names are adapter/ and utils/.

@hekike
Copy link
Contributor

hekike commented Jul 31, 2015

@gyzerok I agree that we should do some improvement here, but I'm not 100% sure what would be the best for now. Let's wait a little bit with this, until everything will be clear in my mind.

Btw it would be great to have a short Skype call about the future of graffiti if you are really interested in. What do you think?

@gyzerok
Copy link
Contributor Author

gyzerok commented Jul 31, 2015

@hekike Since I've started to play around GraphQL I thought about a tool to map existing MongoDB schema into GraphQL schema to avoid code duplication. How exited I was when found graffiti! So I'm very happy that I can help you somehow.

It mb be hard to speak to each other cuz of my poor verbal english skills. But we can try. Find me as gyzerok.

@hekike
Copy link
Contributor

hekike commented Aug 1, 2015

@gyzerok I added fragment support and tests with a workaround: 25fc49c

But we should fix this when graphql-js starts support getting the required fields.
Thanks to handling this!

@hekike
Copy link
Contributor

hekike commented Aug 12, 2015

@gyzerok they fixed it: graphql/graphql-js#96 ;)

@gyzerok
Copy link
Contributor Author

gyzerok commented Aug 12, 2015

@hekike Yes, saw it todays morning :) Gonna come back with a solution in a few days if you not hurry.

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

No branches or pull requests

3 participants