Skip to content

Commit

Permalink
Fixes: "field has a resolve property"
Browse files Browse the repository at this point in the history
  • Loading branch information
mishushakov committed Jun 16, 2023
1 parent b8564e2 commit 82a87b7
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 67 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"url": "https://github.com/stepci/garph"
},
"version": "0.5.6",
"version": "0.5.7",
"license": "MIT",
"main": "dist/index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,12 @@ export function parseFields(name: string, fields: AnyType, config: ConverterConf
defaultValue: field.typeDef.defaultValue,
deprecationReason: field.typeDef.deprecated,
description: field.typeDef.description,
resolve: addResolver(resolvers?.[fieldName], name + '.' + fieldName),
subscribe: resolvers?.[fieldName]?.subscribe
}

if (resolvers?.[fieldName]) {
fieldsObj[fieldName].resolve = addResolver(resolvers[fieldName], `${name}.${fieldName}`)
}
})

return fieldsObj
Expand Down
38 changes: 19 additions & 19 deletions www/api/classes/GarphSchema.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#### Defined in

[index.ts:578](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L578)
[index.ts:578](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L578)

___

Expand All @@ -35,7 +35,7 @@ ___

#### Defined in

[index.ts:589](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L589)
[index.ts:589](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L589)

___

Expand All @@ -45,7 +45,7 @@ ___

#### Defined in

[index.ts:582](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L582)
[index.ts:582](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L582)

___

Expand All @@ -55,7 +55,7 @@ ___

#### Defined in

[index.ts:577](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L577)
[index.ts:577](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L577)

## Methods

Expand All @@ -69,7 +69,7 @@ ___

#### Defined in

[index.ts:677](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L677)
[index.ts:677](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L677)

___

Expand Down Expand Up @@ -97,7 +97,7 @@ ___

#### Defined in

[index.ts:608](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L608)
[index.ts:608](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L608)

___

Expand Down Expand Up @@ -125,7 +125,7 @@ ___

#### Defined in

[index.ts:618](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L618)
[index.ts:618](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L618)

___

Expand Down Expand Up @@ -153,7 +153,7 @@ ___

#### Defined in

[index.ts:637](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L637)
[index.ts:637](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L637)

___

Expand All @@ -167,7 +167,7 @@ ___

#### Defined in

[index.ts:673](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L673)
[index.ts:673](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L673)

___

Expand All @@ -181,7 +181,7 @@ ___

#### Defined in

[index.ts:665](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L665)
[index.ts:665](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L665)

___

Expand Down Expand Up @@ -209,7 +209,7 @@ ___

#### Defined in

[index.ts:631](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L631)
[index.ts:631](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L631)

___

Expand All @@ -223,7 +223,7 @@ ___

#### Defined in

[index.ts:669](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L669)
[index.ts:669](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L669)

___

Expand Down Expand Up @@ -251,7 +251,7 @@ ___

#### Defined in

[index.ts:655](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L655)
[index.ts:655](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L655)

___

Expand Down Expand Up @@ -279,7 +279,7 @@ ___

#### Defined in

[index.ts:602](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L602)
[index.ts:602](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L602)

___

Expand All @@ -305,7 +305,7 @@ ___

#### Defined in

[index.ts:683](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L683)
[index.ts:683](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L683)

___

Expand Down Expand Up @@ -333,7 +333,7 @@ ___

#### Defined in

[index.ts:649](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L649)
[index.ts:649](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L649)

___

Expand All @@ -347,7 +347,7 @@ ___

#### Defined in

[index.ts:661](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L661)
[index.ts:661](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L661)

___

Expand Down Expand Up @@ -375,7 +375,7 @@ ___

#### Defined in

[index.ts:596](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L596)
[index.ts:596](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L596)

___

Expand Down Expand Up @@ -403,4 +403,4 @@ ___

#### Defined in

[index.ts:643](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L643)
[index.ts:643](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L643)
18 changes: 9 additions & 9 deletions www/api/classes/Type.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#### Defined in

[index.ts:13](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L13)
[index.ts:13](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L13)

___

Expand All @@ -40,7 +40,7 @@ ___

#### Defined in

[index.ts:11](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L11)
[index.ts:11](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L11)

___

Expand All @@ -50,7 +50,7 @@ ___

#### Defined in

[index.ts:10](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L10)
[index.ts:10](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L10)

___

Expand All @@ -60,7 +60,7 @@ ___

#### Defined in

[index.ts:9](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L9)
[index.ts:9](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L9)

___

Expand All @@ -70,7 +70,7 @@ ___

#### Defined in

[index.ts:12](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L12)
[index.ts:12](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L12)

___

Expand All @@ -80,7 +80,7 @@ ___

#### Defined in

[index.ts:14](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L14)
[index.ts:14](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L14)

___

Expand All @@ -90,7 +90,7 @@ ___

#### Defined in

[index.ts:15](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L15)
[index.ts:15](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L15)

## Methods

Expand All @@ -110,7 +110,7 @@ ___

#### Defined in

[index.ts:22](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L22)
[index.ts:22](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L22)

___

Expand All @@ -130,4 +130,4 @@ ___

#### Defined in

[index.ts:17](https://github.com/stepci/garph/blob/898cac6/src/index.ts#L17)
[index.ts:17](https://github.com/stepci/garph/blob/b8564e2/src/index.ts#L17)

0 comments on commit 82a87b7

Please sign in to comment.