Uh oh!
There was an error while loading. Please reload this page.
Redesign to enable typedef output - #81
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Identical blocks of code found in 2 locations. Consider refactoring.
| ), | ||
| }) | ||
| if (visibility.createSubscription) |
There was a problem hiding this comment.
Similar blocks of code found in 3 locations. Consider refactoring.
lordnox
commented
Jul 24, 2019
🎉 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