-
Notifications
You must be signed in to change notification settings - Fork 920
Feature/graphql #40
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
Feature/graphql #40
Conversation
…tuff. Update readme
- wrong enable setting - use seperate setting for editor
- No need for lodash overhead - merge of lodash does recursivly merge which can be bad and time consuming
…ools curl interprets 000 as timeout
| }; | ||
|
|
||
| public async run(root: any, args: CreatePetMutationArguments, context: GraphQLContext<any, any>): Promise<Pet> { | ||
| const petService = context.container.get<PetService>(PetService); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have this over DI, but think for the next step.
| } else { | ||
| /* tslint:disable */ | ||
| // @ts-ignore | ||
| orderedResult.push(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use undefined as any as T?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must be null is given from the lib
| }; | ||
|
|
||
| const allFiles = directories.reduce((allDirs, dir) => { | ||
| return allDirs.concat(require('glob').sync(path.normalize(dir))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It there a reason why we don't import glob at the top?
| let connection: Connection; | ||
| beforeAll(async () => connection = await createDatabaseConnection()); | ||
| beforeEach(() => synchronizeDatabase(connection)); | ||
| afterAll(() => closeDatabase(connection)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though the closeDatabase function didn't exist before my review commits it has not thrown a error in TS.
Based on this fact any TS errors in integration tests, which don't fail the app hard, will not be detected by the developer.
| }; | ||
|
|
||
| export const synchronizeDatabase = (connection: Connection) => { | ||
| return connection.synchronize(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use migrations as sync is not aligned with migrations and migrations is the truth representation of the schema.
No description provided.