-
Notifications
You must be signed in to change notification settings - Fork 2
Redesign to enable typedef output #81
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
Conversation
| model: ModelBuilder<Context, any>, | ||
| service: Service<Type, GQLType>, | ||
| context: Wrapped<Context>, | ||
| export const createModel = <BuildMode, Type, GQLType = Type>( |
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.
Function createModel has 74 lines of code (exceeds 25 allowed). Consider refactoring.
| }, | ||
| ) => void | ||
|
|
||
| export type AddType<BuildMode, Source, Context> = AddScalarType & |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
|
|
||
| export * from './extension-model' | ||
|
|
||
| export const createBuild = <BuildMode = null, Context = any>( |
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.
Function createBuild has 94 lines of code (exceeds 25 allowed). Consider refactoring.
| ] | ||
|
|
||
| export type AddArgs<BuildMode, Source, Context> = | ||
| | AddScalarArgsType |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
| fields: convertGraphQLFieldConfigMap(model.dataFields(dataType)), | ||
| }) | ||
|
|
||
| export const addModel = <BuildMode, Context>( |
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.
Function addModel has 160 lines of code (exceeds 25 allowed). Consider refactoring.
|
Code Climate has analyzed commit 54cc3f7 and detected 27 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 90.2% (50% is the threshold). This pull request will bring the total coverage in the repository to 86.4%. View more on Code Climate. |
| }) | ||
|
|
||
| if (visibility.createMutation) | ||
| build.addMutation(names.fields.create, modelBuilder.name, { |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
| resolver?: Record<string, IFieldResolver<Source, Context>>; | ||
| } | ||
| ] | ||
| export type AddInputArgsType<BuildMode, Source, Context> = [ |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
| wrapped: Wrapped<BuildMode>, | ||
| ) => { | ||
| const build = baseBuild as WithAddModel<BuildMode, Context> | ||
| build.addModel = modelBuilder => { |
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.
Function addModel has 156 lines of code (exceeds 25 allowed). Consider refactoring.
| > | ||
|
|
||
| export type AddScalarArgsType = [string, 'scalar', never] | ||
| export type AddInterfaceArgsType<BuildMode, Source, Context> = [ |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
| export type AddObjectArgsType<BuildMode, Source, Context> = [ | ||
| string, | ||
| 'type', | ||
| { |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
| }) | ||
|
|
||
| if (visibility.deleteMutation) | ||
| build.addMutation(names.fields.delete, list(modelBuilder.name), { |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
| [], | ||
| ).join('\n ') | ||
|
|
||
| export const createBuildModeResolver = <BuildMode>(buildMode: BuildMode) => < |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
|
|
||
| import { isBuildModeGenerator } from './guards' | ||
|
|
||
| export const createBuildModeResolver = <BuildMode>(buildMode: BuildMode) => < |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
| export type AddObjectType<BuildMode, Source, Context> = ( | ||
| typeName: string, | ||
| type: 'type', | ||
| config: { |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
| ), | ||
| }) | ||
|
|
||
| if (visibility.createSubscription) |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
added createBuild module
connected createBuild module to schemaBuilder
replaced old system