Use GraphQLModules#493
Conversation
4c1aa41 to
74a13bb
Compare
|
Hey, thanks for the pr, can you give a bit of context for these changes please? |
4eb1e5e to
2054e21
Compare
Codecov Report
@@ Coverage Diff @@
## master #493 +/- ##
=======================================
Coverage 95.77% 95.77%
=======================================
Files 57 57
Lines 1277 1277
Branches 179 179
=======================================
Hits 1223 1223
Misses 51 51
Partials 3 3Continue to review full report at Codecov.
|
d6af22b to
b549fc5
Compare
|
Hi @pradel, We would love to see AccountsJS has built-in GraphQL-Modules support, and uses the benefits of our library. @dotansimha is one of the main contributors of GraphQL-Modules, and AFAIK he also contributed to We also want to write a blog post about a GraphQL boilerplate with Authentication using GraphQL-Modules and AccountsJS together with GraphQL Code Generator's TypeScript benefits that will be so much easy to start a GraphQL project with Authentication for beginners. To sum up, the benefits are;
|
ae7120a to
5897851
Compare
|
I think it's great :) @davidyaha what do you think? 😄 |
|
I think this is a great idea, will review soon, thanks for the contribution! |
Signed-off-by: Arda TANRIKULU <[email protected]>
5897851 to
fbcb1af
Compare
|
I like the idea too! |
Signed-off-by: Arda TANRIKULU <[email protected]>
|
Code looks good and e2e tests are passing! const typeDefs = `
extends type User {
firstname: String!
}
`;Then this field will be injected by the account module user resolver directly |
|
Same when we are creating a new user, how to extends the createUser input with new variables? |
Co-Authored-By: ardatan <[email protected]>
|
Everything is same if you're not using GraphQL-Modules, I mean the exported schema is exactly same like before; so you can still use import { AccountsModule } from '@accounts/graphql-api';
import { GraphQLModule } from '@graphql-modules/core';
export const AppModule = new GraphQLModule({
typeDefs: gql`
type User {
firstname: String!
}
input CreateUserInput {
firstName: String!
}
`,
resolvers: {...},
imports: [
AccountsModule.forRoot({...})
]
});
const { typeDefs } = AppModule;
// Now typeDefs has User and CreateUserInput types with firstname and other fields from AccountsModule |
|
Amazing thanks for the explanation @ardatan! |
|
@pradel Thank you for your good thoughts :) It is really great to see these two projects together. |
Signed-off-by: Arda TANRIKULU <[email protected]>
e8e8a13 to
115e8c2
Compare
… Use-GraphQLModules
115e8c2 to
a9162a6
Compare
|
@dotansimha Graphql Modules sounds great! Congrats on open sourcing it!! |
|
@pradel @TimMikeladze @davidyaha Any chance we can get it merged and released soon? 😄 |
|
I can merge and cut a release within the next 24 hours. |
|
Thanks for the PR 👍 Merged and published. |
Uh oh!
There was an error while loading. Please reload this page.