ardatan / graphql-modules-accountsjs-boilerplate Goto Github PK
View Code? Open in Web Editor NEWhttps://medium.com/the-guild/authentication-with-accountsjs-graphql-modules-e0fb9799a9da
https://medium.com/the-guild/authentication-with-accountsjs-graphql-modules-e0fb9799a9da
I wonder, what is the proper use of this repository? Especially I mean the server part. It has been some time since it was released, dependencies evolved, some renovate bot pull request seem to be merged, some not...
Nowadays, if I want to use it, I am getting warnings or errors and it does not compile. Is it possible to use it standalone on a clean system or it needs some prerequisites like accounts-js installed/linked? Or is this trouble caused by fragility of accounts-js?
Nice article, nice idea, but with an increased interest in GraphQL more people will quite likely stumble upon the article so it might make a sense to keep this updated to some extent and give an easy entry to play with.
prishub@ubuntu-one:~/dev/xxx/web/graphql-modules-accountsjs-boilerplate$ cd server
prishub@ubuntu-one:~/dev/xxx/web/graphql-modules-accountsjs-boilerplate/server$ yarn install
yarn install v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @accounts/[email protected]" has incorrect peer dependency "@graphql-modules/[email protected]".
warning "@accounts/graphql-api > @accounts/[email protected]" has incorrect peer dependency "@accounts/server@^0.7.0".
warning " > @accounts/[email protected]" has incorrect peer dependency "@accounts/server@^0.7.0".
warning "apollo-server > apollo-server-core > [email protected]" has incorrect peer dependency "[email protected] - 14.0.x".
[4/4] Building fresh packages...
Done in 29.68s.
prishub@ubuntu-one:~/dev/xxx/web/graphql-modules-accountsjs-boilerplate/server$ yarn add @graphql-modules/[email protected]
yarn add v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@accounts/graphql-api > @accounts/[email protected]" has incorrect peer dependency "@accounts/server@^0.7.0".
warning " > @accounts/[email protected]" has incorrect peer dependency "@accounts/server@^0.7.0".
warning "apollo-server > apollo-server-core > [email protected]" has incorrect peer dependency "[email protected] - 14.0.x".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ @graphql-modules/[email protected]
info All dependencies
├─ @graphql-modules/[email protected]
└─ @graphql-modules/[email protected]
Done in 14.43s.
prishub@ubuntu-one:~/dev/xxx/web/graphql-modules-accountsjs-boilerplate/server$ yarn add @accounts/server@^0.7.0
yarn add v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "apollo-server > apollo-server-core > [email protected]" has incorrect peer dependency "[email protected] - 14.0.x".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ @accounts/[email protected]
info All dependencies
└─ @accounts/[email protected]
Done in 15.99s.
prishub@ubuntu-one:~/dev/xxx/web/graphql-modules-accountsjs-boilerplate/server$ yarn add [email protected]
yarn add v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
Done in 13.12s.
prishub@ubuntu-one:~/dev/xxx/web/graphql-modules-accountsjs-boilerplate/server$ tsc
node_modules/@apollographql/apollo-tools/lib/schema/resolveObject.d.ts:3:16 - error TS2665: Invalid module name in augmentation. Module 'graphql/type/definition' resolves to an untyped module at '/home/prishub/dev/xxx/web/graphql-modules-accountsjs-boilerplate/server/node_modules/graphql/type/definition.js', which cannot be augmented.
3 declare module "graphql/type/definition" {
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@types/node/index.d.ts:200:11 - error TS2300: Duplicate identifier 'IteratorResult'.
200 interface IteratorResult<T> { }
~~~~~~~~~~~~~~
../../../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6
41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.
node_modules/apollo-cache-control/dist/index.d.ts:22:16 - error TS2665: Invalid module name in augmentation. Module 'graphql/type/definition' resolves to an untyped module at '/home/prishub/dev/xxx/web/graphql-modules-accountsjs-boilerplate/server/node_modules/graphql/type/definition.js', which cannot be augmented.
22 declare module 'graphql/type/definition' {
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/graphql-codegen-typescript-common/dist/helpers.d.ts:2:28 - error TS2307: Cannot find module 'handlebars'.
2 import { SafeString } from 'handlebars';
~~~~~~~~~~~~
node_modules/graphql-codegen-typescript-common/dist/helpers.d.ts:3:29 - error TS2307: Cannot find module 'handlebars'.
3 import * as Handlebars from 'handlebars';
~~~~~~~~~~~~
src/modules/app/app.module.ts:16:34 - error TS2322: Type 'import("/home/prishub/dev/xxx/web/graphql-modules-accountsjs-boilerplate/server/node_modules/@accounts/server/lib/accounts-server").AccountsServer' is not assignable to type 'import("/home/prishub/dev/xxx/web/graphql-modules-accountsjs-boilerplate/server/node_modules/@accounts/graphql-api/node_modules/@accounts/server/lib/accounts-server").AccountsServer'.
Types have separate declarations of a private property 'services'.
16 AccountsModule.forRoot({ accountsServer }),
~~~~~~~~~~~~~~
node_modules/@accounts/graphql-api/lib/modules/accounts/index.d.ts:10:5
10 accountsServer: AccountsServer;
~~~~~~~~~~~~~~
The expected type comes from property 'accountsServer' which is declared here on type 'AccountsModuleConfig'
src/modules/posts/providers/posts.provider.ts:3:30 - error TS2307: Cannot find module '@models'.
3 import { PostDbObject } from "@models";
~~~~~~~~~
src/modules/posts/resolvers/mutation.resolvers.ts:1:28 - error TS2307: Cannot find module '@models'.
1 import { IResolvers } from "@models";
~~~~~~~~~
src/modules/posts/resolvers/post.resolvers.ts:2:28 - error TS2307: Cannot find module '@models'.
2 import { IResolvers } from '@models';
~~~~~~~~~
src/modules/posts/resolvers/query.resolvers.ts:1:28 - error TS2307: Cannot find module '@models'.
1 import { IResolvers } from "@models";
~~~~~~~~~
src/modules/posts/resolvers/user.resolvers.ts:2:28 - error TS2307: Cannot find module '@models'.
2 import { IResolvers } from "@models";
~~~~~~~~~
../../../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6 - error TS2300: Duplicate identifier 'IteratorResult'.
41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
~~~~~~~~~~~~~~
node_modules/@types/node/index.d.ts:200:11
200 interface IteratorResult<T> { }
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.
Found 12 errors.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.