Skip to content

Commit ff1817c

Browse files
committed
fix: dependant types resolver
1 parent cbacbf2 commit ff1817c

File tree

12 files changed

+344
-551
lines changed

12 files changed

+344
-551
lines changed

dist/libs/tools/workspace/src/generators/nx-project-config/project-tags/add-project-tags.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/libs/tools/workspace/src/generators/nx-project-config/project-tags/add-project-tags.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/backend/application/type/src/use-case/type-adapter/default-type-adapter/default-type-adapter.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export class DefaultTypeAdapterService implements ITypeTransformer {
173173
throw new Error('No matching type found')
174174
}
175175

176-
return { ...results, owner: this.authDomainService.currentUser }
176+
return results
177177
}
178178

179179
// async arrayType(type: string): Promise<IArrayType> {

libs/backend/infra/adapter/neo4j-schema/src/resolver/element/element.resolver.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export const ElementResolverProvider: FactoryProvider<
2323
provide: ELEMENT_RESOLVER_PROVIDER,
2424
useFactory: async (
2525
elementDependantTypesService: ElementDependantTypesService,
26-
typeFactory: TypeFactory,
2726
) => {
2827
/**
2928
* @returns Must return the full properties
@@ -38,8 +37,6 @@ export const ElementResolverProvider: FactoryProvider<
3837
element,
3938
)
4039

41-
console.log('dependantTypes', types)
42-
4340
return types
4441
}
4542

libs/frontend/abstract/domain/src/type/fragments/base-type.fragment.graphql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ fragment BaseType on IBaseType {
44
id
55
kind
66
name
7+
owner {
8+
id
9+
}
710
}

libs/shared/domain/module/type/src/graphql/get-type.api.graphql.api.gen.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { graphql } from '@codelab/shared/infra/gql'
44
import { gqlRequest } from '@codelab/shared/infra/fetch'
55
import {
66
BaseTypeFragmentDoc,
7-
BaseTypeRefFragmentDoc,
87
TypeFragmentDoc,
98
ReactNodeTypeFragmentDoc,
109
RichTextTypeFragmentDoc,

libs/shared/domain/module/type/src/graphql/get-type.api.graphql.docs.gen.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import * as Types from '@codelab/shared/infra/gql'
33
import { graphql } from '@codelab/shared/infra/gql'
44
import {
55
BaseTypeFragmentDoc,
6-
BaseTypeRefFragmentDoc,
76
TypeFragmentDoc,
87
ReactNodeTypeFragmentDoc,
98
RichTextTypeFragmentDoc,

libs/shared/domain/module/type/src/graphql/get-type.api.graphql.web.gen.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { graphql } from '@codelab/shared/infra/gql'
44
import { gqlServerRequest } from '@codelab/shared/infra/fetch-server'
55
import {
66
BaseTypeFragmentDoc,
7-
BaseTypeRefFragmentDoc,
87
TypeFragmentDoc,
98
ReactNodeTypeFragmentDoc,
109
RichTextTypeFragmentDoc,

libs/shared/infra/gql/src/gql/gql.ts

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,10 @@ const documents = {
8585
types.ActionTypeFragmentDoc,
8686
'\n fragment AppType on AppType {\n ...BaseType\n }\n':
8787
types.AppTypeFragmentDoc,
88-
'\n fragment ArrayType on ArrayType {\n ...BaseType\n itemType {\n ... on IBaseType {\n ...BaseTypeRef\n }\n }\n }\n':
88+
'\n fragment ArrayType on ArrayType {\n ...BaseType\n itemType {\n ... on IBaseType {\n ...BaseType\n }\n }\n }\n':
8989
types.ArrayTypeFragmentDoc,
90-
'\n fragment BaseType on IBaseType {\n __typename\n id\n kind\n name\n }\n':
90+
'\n fragment BaseType on IBaseType {\n __typename\n id\n kind\n name\n owner {\n id\n }\n }\n':
9191
types.BaseTypeFragmentDoc,
92-
'\n fragment BaseTypeRef on IBaseType {\n __typename\n id\n kind\n name\n }\n':
93-
types.BaseTypeRefFragmentDoc,
9492
'\n fragment CodeMirrorType on CodeMirrorType {\n ...BaseType\n language\n }\n':
9593
types.CodeMirrorTypeFragmentDoc,
9694
'\n fragment ElementType on ElementType {\n ...BaseType\n elementKind\n }\n':
@@ -99,7 +97,7 @@ const documents = {
9997
types.EnumTypeValueFragmentDoc,
10098
'\n fragment EnumType on EnumType {\n ...BaseType\n allowedValues {\n ...EnumTypeValue\n }\n }\n':
10199
types.EnumTypeFragmentDoc,
102-
'\n fragment Field on Field {\n __typename\n api {\n ... on InterfaceType {\n ...BaseTypeRef\n }\n }\n defaultValues\n description\n fieldType {\n ... on IBaseType {\n ...BaseType\n }\n }\n id\n key\n name\n nextSibling {\n id\n }\n prevSibling {\n id\n }\n validationRules\n }\n':
100+
'\n fragment Field on Field {\n __typename\n api {\n ... on InterfaceType {\n ...BaseType\n }\n }\n defaultValues\n description\n fieldType {\n ... on IBaseType {\n ...BaseType\n }\n }\n id\n key\n name\n nextSibling {\n id\n }\n prevSibling {\n id\n }\n validationRules\n }\n':
103101
types.FieldFragmentDoc,
104102
'\n fragment InterfaceType on InterfaceType {\n ...BaseType\n fields {\n ...Field\n }\n }\n':
105103
types.InterfaceTypeFragmentDoc,
@@ -117,7 +115,7 @@ const documents = {
117115
types.RichTextTypeFragmentDoc,
118116
'\n fragment Type on IBaseType {\n ...ActionType\n ...AppType\n ...ArrayType\n ...CodeMirrorType\n ...ElementType\n ...EnumType\n ...InterfaceType\n ...LambdaType\n ...PageType\n ...PrimitiveType\n ...ReactNodeType\n ...RenderPropType\n ...RichTextType\n ...UnionType\n }\n':
119117
types.TypeFragmentDoc,
120-
'\n fragment UnionType on UnionType {\n ...BaseType\n typesOfUnionType {\n ... on IBaseType {\n ...BaseTypeRef\n }\n }\n }\n':
118+
'\n fragment UnionType on UnionType {\n ...BaseType\n typesOfUnionType {\n ... on IBaseType {\n ...BaseType\n }\n }\n }\n':
121119
types.UnionTypeFragmentDoc,
122120
'\n fragment Owner on User {\n id\n }\n': types.OwnerFragmentDoc,
123121
'\n fragment User on User {\n apps {\n id\n }\n auth0Id\n email\n id\n preferences {\n ...Preference\n }\n roles\n username\n }\n':
@@ -636,20 +634,14 @@ export function graphql(
636634
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
637635
*/
638636
export function graphql(
639-
source: '\n fragment ArrayType on ArrayType {\n ...BaseType\n itemType {\n ... on IBaseType {\n ...BaseTypeRef\n }\n }\n }\n',
640-
): (typeof documents)['\n fragment ArrayType on ArrayType {\n ...BaseType\n itemType {\n ... on IBaseType {\n ...BaseTypeRef\n }\n }\n }\n']
637+
source: '\n fragment ArrayType on ArrayType {\n ...BaseType\n itemType {\n ... on IBaseType {\n ...BaseType\n }\n }\n }\n',
638+
): (typeof documents)['\n fragment ArrayType on ArrayType {\n ...BaseType\n itemType {\n ... on IBaseType {\n ...BaseType\n }\n }\n }\n']
641639
/**
642640
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
643641
*/
644642
export function graphql(
645-
source: '\n fragment BaseType on IBaseType {\n __typename\n id\n kind\n name\n }\n',
646-
): (typeof documents)['\n fragment BaseType on IBaseType {\n __typename\n id\n kind\n name\n }\n']
647-
/**
648-
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
649-
*/
650-
export function graphql(
651-
source: '\n fragment BaseTypeRef on IBaseType {\n __typename\n id\n kind\n name\n }\n',
652-
): (typeof documents)['\n fragment BaseTypeRef on IBaseType {\n __typename\n id\n kind\n name\n }\n']
643+
source: '\n fragment BaseType on IBaseType {\n __typename\n id\n kind\n name\n owner {\n id\n }\n }\n',
644+
): (typeof documents)['\n fragment BaseType on IBaseType {\n __typename\n id\n kind\n name\n owner {\n id\n }\n }\n']
653645
/**
654646
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
655647
*/
@@ -678,8 +670,8 @@ export function graphql(
678670
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
679671
*/
680672
export function graphql(
681-
source: '\n fragment Field on Field {\n __typename\n api {\n ... on InterfaceType {\n ...BaseTypeRef\n }\n }\n defaultValues\n description\n fieldType {\n ... on IBaseType {\n ...BaseType\n }\n }\n id\n key\n name\n nextSibling {\n id\n }\n prevSibling {\n id\n }\n validationRules\n }\n',
682-
): (typeof documents)['\n fragment Field on Field {\n __typename\n api {\n ... on InterfaceType {\n ...BaseTypeRef\n }\n }\n defaultValues\n description\n fieldType {\n ... on IBaseType {\n ...BaseType\n }\n }\n id\n key\n name\n nextSibling {\n id\n }\n prevSibling {\n id\n }\n validationRules\n }\n']
673+
source: '\n fragment Field on Field {\n __typename\n api {\n ... on InterfaceType {\n ...BaseType\n }\n }\n defaultValues\n description\n fieldType {\n ... on IBaseType {\n ...BaseType\n }\n }\n id\n key\n name\n nextSibling {\n id\n }\n prevSibling {\n id\n }\n validationRules\n }\n',
674+
): (typeof documents)['\n fragment Field on Field {\n __typename\n api {\n ... on InterfaceType {\n ...BaseType\n }\n }\n defaultValues\n description\n fieldType {\n ... on IBaseType {\n ...BaseType\n }\n }\n id\n key\n name\n nextSibling {\n id\n }\n prevSibling {\n id\n }\n validationRules\n }\n']
683675
/**
684676
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
685677
*/
@@ -732,8 +724,8 @@ export function graphql(
732724
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
733725
*/
734726
export function graphql(
735-
source: '\n fragment UnionType on UnionType {\n ...BaseType\n typesOfUnionType {\n ... on IBaseType {\n ...BaseTypeRef\n }\n }\n }\n',
736-
): (typeof documents)['\n fragment UnionType on UnionType {\n ...BaseType\n typesOfUnionType {\n ... on IBaseType {\n ...BaseTypeRef\n }\n }\n }\n']
727+
source: '\n fragment UnionType on UnionType {\n ...BaseType\n typesOfUnionType {\n ... on IBaseType {\n ...BaseType\n }\n }\n }\n',
728+
): (typeof documents)['\n fragment UnionType on UnionType {\n ...BaseType\n typesOfUnionType {\n ... on IBaseType {\n ...BaseType\n }\n }\n }\n']
737729
/**
738730
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
739731
*/

0 commit comments

Comments
 (0)