This commit is contained in:
Dmitrii Samsonov 2024-06-14 14:43:14 +02:00 коммит произвёл Dmitrii
Родитель f8368e85de
Коммит a8d6dd3780
4 изменённых файлов: 114 добавлений и 18 удалений

Просмотреть файл

@ -21,14 +21,15 @@
"@types/lodash.camelcase": "^4.3.6",
"@types/lodash.kebabcase": "^4.1.6",
"graphql": "^15.0.0",
"json-schema-to-ts": "2.9.1",
"lodash.camelcase": "^4.3.0",
"lodash.kebabcase": "^4.1.1",
"monorepo-scripts": "*"
},
"peerDependencies": {
"graphql": "^15.0.0",
"lodash.kebabcase": "^4.1.1",
"lodash.camelcase": "^4.3.0"
"lodash.camelcase": "^4.3.0",
"lodash.kebabcase": "^4.1.1"
},
"publishConfig": {
"main": "./lib/index",

Просмотреть файл

@ -6,6 +6,9 @@
"rootDir": "src",
"outDir": "lib"
},
"include": ["src"],
"include": [
"src",
"./types/kind-override.d.ts"
],
"references": []
}

73
packages/graphql-eslint-rules/types/kind-override.d.ts поставляемый Normal file
Просмотреть файл

@ -0,0 +1,73 @@
export * from "graphql";
declare module "graphql" {
/**
* Replaces const Kind with enum Kind to allow successful type build
*/
export enum Kind {
// Name
NAME = "Name",
// Document
DOCUMENT = "Document",
OPERATION_DEFINITION = "OperationDefinition",
VARIABLE_DEFINITION = "VariableDefinition",
SELECTION_SET = "SelectionSet",
FIELD = "Field",
ARGUMENT = "Argument",
// Fragments
FRAGMENT_SPREAD = "FragmentSpread",
INLINE_FRAGMENT = "InlineFragment",
FRAGMENT_DEFINITION = "FragmentDefinition",
// Values
VARIABLE = "Variable",
INT = "IntValue",
FLOAT = "FloatValue",
STRING = "StringValue",
BOOLEAN = "BooleanValue",
NULL = "NullValue",
ENUM = "EnumValue",
LIST = "ListValue",
OBJECT = "ObjectValue",
OBJECT_FIELD = "ObjectField",
// Directives
DIRECTIVE = "Directive",
// Types
NAMED_TYPE = "NamedType",
LIST_TYPE = "ListType",
NON_NULL_TYPE = "NonNullType",
// Type System Definitions
SCHEMA_DEFINITION = "SchemaDefinition",
OPERATION_TYPE_DEFINITION = "OperationTypeDefinition",
// Type Definitions
SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition",
OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition",
FIELD_DEFINITION = "FieldDefinition",
INPUT_VALUE_DEFINITION = "InputValueDefinition",
INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition",
UNION_TYPE_DEFINITION = "UnionTypeDefinition",
ENUM_TYPE_DEFINITION = "EnumTypeDefinition",
ENUM_VALUE_DEFINITION = "EnumValueDefinition",
INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition",
// Directive Definitions
DIRECTIVE_DEFINITION = "DirectiveDefinition",
// Type System Extensions
SCHEMA_EXTENSION = "SchemaExtension",
// Type Extensions
SCALAR_TYPE_EXTENSION = "ScalarTypeExtension",
OBJECT_TYPE_EXTENSION = "ObjectTypeExtension",
INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension",
UNION_TYPE_EXTENSION = "UnionTypeExtension",
ENUM_TYPE_EXTENSION = "EnumTypeExtension",
INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension",
}
}

Просмотреть файл

@ -5719,11 +5719,11 @@ create-require@^1.1.0:
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
cross-fetch@3.1.4, cross-fetch@^3.0.4, cross-fetch@^3.0.6, cross-fetch@^3.1.4, cross-fetch@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==
version "3.1.8"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82"
integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==
dependencies:
node-fetch "2.6.7"
node-fetch "^2.6.12"
cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
@ -7527,10 +7527,10 @@ graphql-ws@^5.4.1:
resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.5.0.tgz#79f10248d23d104369eaef93acb9f887276a2c42"
integrity sha512-WQepPMGQQoqS2VsrI2I3RMLCVz3CW4/6ZqGV6ABDOwH4R62DzjxwMlwZbj6vhSI/7IM3/C911yITwgs77iO/hw==
graphql@*, graphql@^15.0.0, graphql@^15.6.0, graphql@^15.6.1:
version "15.8.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.8.0.tgz#33410e96b012fa3bdb1091cc99a94769db212b38"
integrity sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==
graphql@*:
version "16.8.2"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.2.tgz#54771c7ff195da913f5e70af8044a026d32eca2a"
integrity sha512-cvVIBILwuoSyD54U4cF/UXDh5yAobhNV/tPygI4lZhgOIJQE/WLWC4waBRb4I6bDVYb3OVx3lfHbaQOEoUD5sg==
graphql@16.8.1:
version "16.8.1"
@ -7544,6 +7544,11 @@ graphql@^14.5.3:
dependencies:
iterall "^1.2.2"
graphql@^15.0.0, graphql@^15.6.0, graphql@^15.6.1:
version "15.8.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.8.0.tgz#33410e96b012fa3bdb1091cc99a94769db212b38"
integrity sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==
handle-thing@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e"
@ -9013,6 +9018,15 @@ json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1:
resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==
json-schema-to-ts@2.9.1:
version "2.9.1"
resolved "https://registry.yarnpkg.com/json-schema-to-ts/-/json-schema-to-ts-2.9.1.tgz#0e055b787587477abdb7e880c874efad3dba7779"
integrity sha512-8MNpRGERlCUWYeJwsWkMrJ0MWzBz49dfqpG+n9viiIlP4othaahbiaNQZuBzmPxRLUhOv1QJMCzW5WE8nHFGIQ==
dependencies:
"@babel/runtime" "^7.18.3"
"@types/json-schema" "^7.0.9"
ts-algebra "^1.2.0"
json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
@ -9810,9 +9824,9 @@ minimatch@^5.1.0:
brace-expansion "^2.0.1"
minimist@1.2.5, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:
version "1.2.7"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
minipass@^3.0.0:
version "3.1.5"
@ -9968,10 +9982,10 @@ node-emoji@^1.10.0:
dependencies:
lodash.toarray "^4.4.0"
node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.5, node-fetch@^2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.5, node-fetch@^2.6.7:
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"
@ -12332,6 +12346,11 @@ trim@^1.0.1:
resolved "https://registry.yarnpkg.com/trim/-/trim-1.0.1.tgz#68e78f6178ccab9687a610752f4f5e5a7022ee8c"
integrity sha512-3JVP2YVqITUisXblCDq/Bi4P9457G/sdEamInkyvCsjbTcXLXIiG7XCb4kGMFWh6JGXesS3TKxOPtrncN/xe8w==
ts-algebra@^1.2.0:
version "1.2.2"
resolved "https://registry.yarnpkg.com/ts-algebra/-/ts-algebra-1.2.2.tgz#b75d301c28cd4126cd344760a47b43e48e2872e0"
integrity sha512-kloPhf1hq3JbCPOTYoOWDKxebWjNb2o/LKnNfkWhxVVisFFmMJPPdJeGoGmM+iRLyoXAR61e08Pb+vUXINg8aA==
ts-expect@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/ts-expect/-/ts-expect-1.3.0.tgz#3f8d3966e0e22b5e2bb88337eb99db6816a4c1cf"