Comments (12)
I'm going to investigate in external fragments support and come with PR.
from graffiti-mongoose.
Ok thanks!
from graffiti-mongoose.
Waiting answer on the issue graphql/graphql-js#96 in GraphQL.js.
from graffiti-mongoose.
@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
from graffiti-mongoose.
@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.
from graffiti-mongoose.
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?
from graffiti-mongoose.
_P.S.:_ Or mb better names are adapter/
and utils/
.
from graffiti-mongoose.
@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?
from graffiti-mongoose.
@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
.
from graffiti-mongoose.
@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!
from graffiti-mongoose.
@gyzerok they fixed it: graphql/graphql-js#96 ;)
from graffiti-mongoose.
@hekike Yes, saw it todays morning :) Gonna come back with a solution in a few days if you not hurry.
from graffiti-mongoose.
Related Issues (20)
- Implicit dependency on babel-polyfill HOT 9
- Cannot set currently-valued fields to null in update mutation HOT 2
- How to make a custom field: id? HOT 10
- "TypeError: Cannot read property 'forEach' of undefined" when embedded object field is a reference HOT 6
- Custom query thunk - accepts only InputObject types HOT 3
- Question on customQueries HOT 7
- Example project doesnt work with [email protected] and [email protected] HOT 1
- Async hook support HOT 2
- How to use Express Middleware for Authentication/Authorization. HOT 4
- Get specific field validation error?
- How to mutate nested Schema? HOT 3
- What is different between id and _id HOT 1
- UNMET PEER DEPENDENCY HOT 1
- Maintainer Volunteer Thread HOT 1
- Mongoose ObjectId and GraphQL id is not the same. How to link them? HOT 5
- It is possible to add some description to schema and to be reflected in the docs?
- Does graffiti-mongoose works with react-apollo ? HOT 2
- Custom mutations?
- Custom queries/mutations HOT 1
- setTypeFields bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graffiti-mongoose.