graphile-build
Advanced tools
Comparing version 5.0.0-beta.23 to 5.0.0-beta.24
# graphile-build | ||
## 5.0.0-beta.24 | ||
### Patch Changes | ||
- [#2143](https://github.com/graphile/crystal/pull/2143) | ||
[`e8a0c4441`](https://github.com/graphile/crystal/commit/e8a0c4441cd04402974cd0af6b80816c9cda91e7) | ||
Thanks [@benjie](https://github.com/benjie)! - Add `Self.name` and | ||
`scope.valueName` to context for `GraphQLEnumType_values_value` hook | ||
- Updated dependencies | ||
[[`871d32b2a`](https://github.com/graphile/crystal/commit/871d32b2a18df0d257880fc54a61d9e68c4607d6), | ||
[`a26e3a30c`](https://github.com/graphile/crystal/commit/a26e3a30c02f963f8f5e9c9d021e871f33689e1b), | ||
[`02c11a4d4`](https://github.com/graphile/crystal/commit/02c11a4d42bf434dffc9354b300e8d791c4eeb2d)]: | ||
- grafast@0.1.1-beta.14 | ||
## 5.0.0-beta.23 | ||
@@ -4,0 +18,0 @@ |
@@ -496,4 +496,8 @@ import type { BaseGraphQLArguments, ExecutableStep, GrafastArgumentConfig, GrafastFieldConfig, GrafastFieldConfigArgumentMap, GrafastInputFieldConfig, GrafastInputFieldConfigMap, OutputPlanForType } from "grafast"; | ||
scope: ScopeEnumValues; | ||
Self: { | ||
name: string; | ||
}; | ||
} | ||
interface ScopeEnumValuesValue extends ScopeEnumValues { | ||
valueName: string; | ||
} | ||
@@ -500,0 +504,0 @@ interface ContextEnumValuesValue extends ContextEnumValues { |
@@ -367,7 +367,16 @@ "use strict"; | ||
const finalSpec = builder.applyHooks("GraphQLEnumType", rawSpec, build, enumContext, `|${rawSpec.name}`); | ||
finalSpec.values = builder.applyHooks("GraphQLEnumType_values", finalSpec.values, build, enumContext, `|${finalSpec.name}`); | ||
const valuesContext = { | ||
...enumContext, | ||
Self: { name: finalSpec.name }, | ||
}; | ||
finalSpec.values = builder.applyHooks("GraphQLEnumType_values", finalSpec.values, build, valuesContext, `|${finalSpec.name}`); | ||
const values = finalSpec.values; | ||
finalSpec.values = Object.entries(values).reduce((memo, [valueKey, value]) => { | ||
const newValue = builder.applyHooks("GraphQLEnumType_values_value", value, build, enumContext, `|${finalSpec.name}|${valueKey}`); | ||
memo[valueKey] = newValue; | ||
finalSpec.values = Object.entries(values).reduce((memo, [valueName, value]) => { | ||
const finalValueScope = build.extend({ valueName }, scope, `Extending scope for value '${valueName}' within context for GraphQLEnumType '${rawSpec.name}'`); | ||
const valueContext = { | ||
...valuesContext, | ||
scope: finalValueScope, | ||
}; | ||
const newValue = builder.applyHooks("GraphQLEnumType_values_value", value, build, valueContext, `|${finalSpec.name}|${valueName}`); | ||
memo[valueName] = newValue; | ||
return memo; | ||
@@ -374,0 +383,0 @@ }, Object.create(null)); |
@@ -1,2 +0,2 @@ | ||
export declare const version = "5.0.0-beta.23"; | ||
export declare const version = "5.0.0-beta.24"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
// This file is autogenerated by /scripts/postversion.mjs | ||
exports.version = "5.0.0-beta.23"; | ||
exports.version = "5.0.0-beta.24"; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "graphile-build", | ||
"version": "5.0.0-beta.23", | ||
"version": "5.0.0-beta.24", | ||
"description": "Build a GraphQL schema from plugins", | ||
@@ -56,3 +56,3 @@ "type": "commonjs", | ||
"peerDependencies": { | ||
"grafast": "^0.1.1-beta.13", | ||
"grafast": "^0.1.1-beta.14", | ||
"graphile-config": "^0.0.1-beta.9", | ||
@@ -68,3 +68,3 @@ "graphql": "^16.1.0-experimental-stream-defer.6" | ||
"@types/jest": "^29.5.4", | ||
"graphile-export": "^0.0.2-beta.18", | ||
"graphile-export": "^0.0.2-beta.19", | ||
"graphql": "16.1.0-experimental-stream-defer.6", | ||
@@ -71,0 +71,0 @@ "jest": "^29.6.4", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
471005
5177