@graphcommerce/graphql-codegen-markdown-docs 9.0.0-canary.115 → 9.0.0-canary.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/package.json +4 -4
- package/src/graphql.ts +0 -30
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@graphcommerce/graphql-codegen-markdown-docs",
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
5
|
-
"version": "9.0.0-canary.
|
5
|
+
"version": "9.0.0-canary.116",
|
6
6
|
"sideEffects": false,
|
7
7
|
"type": "commonjs",
|
8
8
|
"main": "dist/index.js",
|
@@ -30,8 +30,8 @@
|
|
30
30
|
"parse-filepath": "^1.0.2"
|
31
31
|
},
|
32
32
|
"peerDependencies": {
|
33
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.
|
34
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.
|
35
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.
|
33
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.116",
|
34
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.116",
|
35
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.116"
|
36
36
|
}
|
37
37
|
}
|
package/src/graphql.ts
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
Kind,
|
3
|
-
type ListTypeNode,
|
4
|
-
type NamedTypeNode,
|
5
|
-
type NonNullTypeNode,
|
6
|
-
type ObjectTypeDefinitionNode,
|
7
|
-
type TypeNode,
|
8
|
-
} from 'graphql'
|
9
|
-
|
10
|
-
export const isListType = (typ?: TypeNode): typ is ListTypeNode => typ?.kind === Kind.LIST_TYPE
|
11
|
-
export const isNonNullType = (typ?: TypeNode): typ is NonNullTypeNode =>
|
12
|
-
typ?.kind === Kind.NON_NULL_TYPE
|
13
|
-
export const isNamedType = (typ?: TypeNode): typ is NamedTypeNode => typ?.kind === Kind.NAMED_TYPE
|
14
|
-
|
15
|
-
export const isInput = (kind: string) => kind.includes('Input')
|
16
|
-
|
17
|
-
type ObjectTypeDefinitionFn = (node: ObjectTypeDefinitionNode) => unknown
|
18
|
-
|
19
|
-
export const ObjectTypeDefinitionBuilder = (
|
20
|
-
useObjectTypes: boolean | undefined,
|
21
|
-
callback: ObjectTypeDefinitionFn,
|
22
|
-
): ObjectTypeDefinitionFn | undefined => {
|
23
|
-
if (!useObjectTypes) return undefined
|
24
|
-
return (node) => {
|
25
|
-
if (/^(Query|Mutation|Subscription)$/.test(node.name.value)) {
|
26
|
-
return undefined
|
27
|
-
}
|
28
|
-
return callback(node)
|
29
|
-
}
|
30
|
-
}
|