Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency graphql-tools to v7 - autoclosed #276

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 15, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
graphql-tools 4.0.3 -> 7.0.5 age adoption passing confidence

Release Notes

ardatan/graphql-tools

v7.0.5

Compare Source

Patch Changes

v7.0.4

Compare Source

Patch Changes
  • Revert mock package to v7 to avoid breaking changes

v7.0.3

Compare Source

Patch Changes

v7.0.2

Compare Source

Patch Changes

v7.0.1

Compare Source

Patch Changes

v7.0.0

Compare Source

Major Changes
Schema Generation and Decoration API (@graphql-tools/schema)
-   Resolver validation options should now be set to `error`, `warn` or `ignore` rather than `true` or `false`. In previous versions, some of the validators caused errors to be thrown, while some issued warnings. This changes brings consistency to validator behavior.

-   The `allowResolversNotInSchema` has been renamed to `requireResolversToMatchSchema`, to harmonize the naming convention of all the validators. The default setting of `requireResolversToMatchSchema` is `error`, matching the previous behavior.
Schema Delegation (delegateToSchema & @graphql-tools/delegate)
-   The `delegateToSchema` return value has matured and been formalized as an `ExternalObject`, in which all errors are integrated into the GraphQL response, preserving their initial path. Those advanced users accessing the result directly will note the change in error handling. This also allows for the deprecation of unnecessary helper functions including `slicedError`, `getErrors`, `getErrorsByPathSegment` functions. Only external errors with missing or invalid paths must still be preserved by annotating the remote object with special properties. The new `getUnpathedErrors` function is therefore necessary for retrieving only these errors. Note also the new `annotateExternalObject` and `mergeExternalObjects` functions, as well as the renaming of `handleResult` to `resolveExternalValue`.

-   Transform types and the `applySchemaTransforms` are now relocated to the `delegate` package; `applyRequestTransforms`/`applyResultTransforms` functions have been deprecated, however, as this functionality has been replaced since v6 by the `Transformer` abstraction.

-   The `transformRequest`/`transformResult` methods are now provided additional `delegationContext` and `transformationContext` arguments -- these were introduced in v6, but previously optional.

-   The `transformSchema` method may wish to create additional delegating resolvers and so it is now provided the `subschemaConfig` and final (non-executable) `transformedSchema` parameters. As in v6, the `transformSchema` is kicked off once to produce the non-executable version, and then, if a wrapping schema is being generated, proxying resolvers are created with access to the (non-executabel) initial result. In v7, the individual `transformSchema` methods also get access to the result of the first run, if necessary, they can create additional wrapping schema proxying resolvers.

-   `applySchemaTransforms` parameters have been updated to match and support the `transformSchema` parameters above.
Remote Schemas & Wrapping (wrapSchema, makeRemoteExecutableSchema, and @graphql-tools/wrap)
-   `wrapSchema` and `generateProxyingResolvers` now only take a single options argument with named properties of type `SubschemaConfig`. The previously possible shorthand version with first argument consisting of a `GraphQLSchema` and second argument representing the transforms should be reworked as a `SubschemaConfig` object.

-   Similarly, the `ICreateProxyingResolverOptions` interface that provides the options for the `createProxyingResolver` property of `SubschemaConfig` options has been adjusted. The `schema` property previously could be set to a `GraphQLSchema` or a `SubschemaConfig` object. This property has been removed in favor of a `subschemaConfig` property that will always be a `SubschemaConfig` object. The `transforms` property has been removed; transforms should be included within the `SubschemaConfig` object.\`

-   The format of the wrapping schema has solidified. All non-root fields are expected to use identical resolvers, either `defaultMergedResolver` or a custom equivalent, with root fields doing the hard work of proxying. Support for custom merged resolvers throught `createMergedResolver` has been deprecated, as custom merging resolvers conflicts when using stitching's type merging, where resolvers are expected to be identical across subschemas.

-   The `WrapFields` transform's `wrappingResolver` option has been removed, as this complicates multiple wrapping layers, as well as planned functionality to wrap subscription root fields in potentially multiple layers, as the wrapping resolvers may be different in different layers. Modifying resolvers can still be performed by use of an additional transform such as `TransformRootFields` or `TransformObjectFields`.

-   The `ExtendSchema` transform has been removed, as it is conceptually simpler just to use `stitchSchemas` with one subschema.

-   The `ReplaceFieldsWithFragment`, `AddFragmentsByField`, `AddSelectionSetsByField`, and `AddMergedTypeSelectionSets` transforms has been removed, as they are superseded by the `AddSelectionSets` and `VisitSelectionSets` transforms. The `AddSelectionSets` purposely takes parsed SDL rather than strings, to nudge end users to parse these strings at build time (when possible), rather than at runtime. Parsing of selection set strings can be performed using the `parseSelectionSet` function from `@graphql-tools/utils`.
Schema Stitching (stitchSchemas & @graphql-tools/stitch)
-   `stitchSchemas`'s `mergeTypes` option is now true by default! This causes the `onTypeConflict` option to be ignored by default. To use `onTypeConflict` to select a specific type instead of simply merging, simply set `mergeTypes` to false.

-   `schemas` argument has been deprecated, use `subschemas`, `typeDefs`, or `types`, depending on what you are stitching.

-   When using batch delegation in type merging, the `argsFromKeys` function is now set only via the `argsFromKeys` property. Previously, if `argsFromKeys` was absent, it could be read from `args`.

-   Support for fragment hints has been removed in favor of selection set hints.

-   `stitchSchemas` now processes all `GraphQLSchema` and `SubschemaConfig` subschema input into new `Subschema` objects, handling schema config directives such aso`@computed` as well as generating the final transformed schema, stored as the `transformedSchema` property, if transforms are used. Signatures of the `onTypeConflict`, `fieldConfigMerger`, and `inputFieldConfigMerger` have been updated to include metadata related to the original and transformed subschemas. Note the property name change for `onTypeConflict` from `schema` to `subschema`.
Mocking (addMocksToSchema and @graphql-tools/mock)
-   Mocks returning objects with fields set as functions are now operating according to upstream graphql-js convention, i.e. these functions take three arguments, `args`, `context`, and `info` with `parent` available as `this` rather than as the first argument.
Other Utilities (@graphql-tools/utils)
-   `filterSchema`'s `fieldFilter` will now filter _all_ fields across Object, Interface, and Input types. For the previous Object-only behavior, switch to the `objectFieldFilter` option.
-   Unused `fieldNodes` utility functions have been removed.
-   Unused `typeContainsSelectionSet` function has been removed, and `typesContainSelectionSet` has been moved to the `stitch` package.
-   Unnecessary `Operation` type has been removed in favor of `OperationTypeNode` from upstream graphql-js.
-   As above, `applySchemaTransforms`/`applyRequestTransforms`/`applyResultTransforms` have been removed from the `utils` package, as they are implemented elsewhere or no longer necessary.

Related Issues

-   proxy all the errors: #​1047, #​1641
-   better error handling for merges #​2016, #​2062
-   fix typings #​1614
-   disable implicit schema pruning #​1817
-   mocks not working for functions #​1807
Patch Changes

v6.2.6

Compare Source

Patch Changes

v6.2.5

Compare Source

Patch Changes

v6.2.4

Compare Source

Patch Changes

v6.2.3

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

  • Update dependencies

🚀 Features

v6.2.2

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🧰 Enhancements

🐛 Bug Fixes

v6.2.1

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🧰 Enhancements

🐛 Bug Fixes

v6.2.0

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🚀 Features

🐛 Bug Fixes

v6.1.0

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🧰 Enhancements

🐛 Bug Fixes

v6.0.18

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

✏️ Docs

🧰 Enhancements

v6.0.17

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🚀 Features

🐛 Bug Fixes

v6.0.16

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🧰 Enhancements

🐛 Bug Fixes

v6.0.15

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🚀 Features

🧰 Enhancements

🐛 Bug Fixes

v6.0.14

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🚀 Features

🧰 Enhancements

  • feat(merge): support multidimensional arrays for mergeTypeDefs and mergeResolvers @​ardatan (#​1789)

🐛 Bug Fixes

v6.0.13

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🚀 Features

🧰 Enhancements

🐛 Bug Fixes

v6.0.12

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🐛 Bug Fixes

v6.0.11

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🚀 Features

🐛 Bug Fixes

v6.0.10

Compare Source

Come talk to us directly on our Discord channel
Contact us here: the-guild.dev

What’s Changed

🚀 Features

🐛 Bug Fixes

v6.0.9

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

  • Fix bad typing imports
  • transforms should support custom root type names (#​1607)
  • temporarily make delegationContext optional until next major version (#​1614)
  • feat(url-loader): ability to get executor and subscriber without introspected schema

v6.0.8

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

  • introduce Subschema class (#​1583)
  • refactor application of transforms (#​1574)
  • introduce input object field transformers: Filter/Rename/TransformInputObjectFields #​1551
  • Able to get generated subschema config instead of wrapped schema from UrlLoader.

v6.0.7

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

  • Introduce Webpack Loader and Node Require Extension (#​1579)
  • Fix skipGraphQLImport's behavior

v6.0.6

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

v6.0.5

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

  • Fix: resolve correct data if schema is wrapped (#​1562)

v6.0.4

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

v6.0.3

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

v6.0.2

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

v6.0.1

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

  • Fix issue in printSchemaWithDirectives (#​1528)
  • Fix mergeSchemas issuee with custom scalars (#​1530)
  • Add missing packages in graphql-tools npm package (#​1524)

v6.0.0

Compare Source

Contact us here for help, more necessary open source tools and Enterprise support
or Chat with us on discord

A huge v6 release with a new monorepo structure!

You can learn more about changes by checking out our:

New Monorepo Structure

v5.0.0

Compare Source

If you like GraphQL Tools, maybe you will also like some of our other projects.
Chat with us on discord

That is a major release where we went through all issues and PRs and got the library back into great shape.
All known issues with schema stitching had been fixed.
The main person which did the heavy lifting is @​yaacovCR which made the work alone on his own fork for many months.

List of changes:

Features
  • Support GraphQL v15 #​1332
  • Adds graphql-upload compatible scalar and link for proxying remote file uploads #​671
  • Add ability to merge fields from types from different schemas
  • Add transforms to wrap, extract, and rename fields #​1183
  • Add transform to filter object fields #​819
  • Exports visitSchema, SchemaVisitor, healSchema, healTypes, cloneSchema, cloneType, cloneDirective to enable more custom transforms. #​1070
  • Allow removing extra delegation layers by passing fetcher/link options directly to delegateToSchema, mergeSchemas, and transformSchema and by filtering directly with filterSchema without additional transformation round #​1165
  • Support CJS and ESM #​913 PR #​1320 PR #​1329
  • Add TransformQuery transform to allow delegating to subfields with error preservation #​543 PR #​1307
  • add WrapType transform to namespace subschema root queries (not for use with mutations) #​961 #​439 PR #​1307
  • Add HoistFields transform to hoist subfields from field to parent type #​781 PR #​1307
  • Add ability to specify custom root type names, with new transform RenameRootTypes that allows changing a subschemas root type, a necessary transform when the subschema includes the root query type within another output type #​892 PR #​1307
  • Add type merging, and otherwise restore onTypeConflict #​1133 #​1118 #​1044 #​863 #​642 #​447 PR #​1307
  • Expose createRequest functionality for alternative method of batching besides using links #​724 PR #​1307
  • Provide support for GraphQLUpload scalar with schema stitching #​671 PR #​1307
  • Let makeRemoteExecutableSchema, wrapSchema, transformSchema, mergeSchemas to specify a custom delegating resolver #​1302
  • Expose mapSchema (which creates new schemas), visitSchema (which modifies existing schemas), healSchema (which visitSchema uses), toConfig, as well as additional utility functions #​1070 #​922 #​786 #​761 PR #​1307
Bug Fixes
  • Avoid using internal api of graphql-js #​1331
  • Filter unused variables from map when proxying requests
  • Preserve subscription errors when using makeRemoteExecutableSchema
  • Preserve extensions when transforming schemas
  • Fix merging and transforming of custom scalars and enums #​501, #​1056, #​1200
  • Allow renaming of subscription root fields #​997, #​1002
  • Fix alias resolution to no longer incorrectly fallback to non-aliased field when null #​1171
  • Do not remove default directives (skip, include, deprecated) when not merging custom directives #​1159
  • Fixes errors support #​743, #​1037, #​1046
  • Fix mergeSchemas to allow resolvers to return fields defined as functions #​1061
  • Fix default values with mergeSchemas and addResolveFunctionsToSchema #​1121
  • Fix interface and union healing
  • Fix stitching unions of types with enums
  • Fix mocking to work when schema stitching
  • Fix lost directives when adding an enum resolver
  • Fix Circular Dependencies #​924 PR #​1326
  • Fix types #​1298 #​1279 #​837 #​1307 #​1325 #​1324
  • issues involving importing directories #​1242 #​1307
  • fix n^2 problem within makeRemoteExecutableSchema #​1346 PR #​1352

v4.0.8

Compare Source

v4.0.7

Compare Source

v4.0.6

Compare Source

  • Use getIntrospectionQuery instead of deprecated introspectionQuery constant from graphql-js
    [@​derek-m

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot changed the title Update dependency graphql-tools to v7 Update dependency graphql-tools to v7 - autoclosed Oct 20, 2021
@renovate renovate bot closed this Oct 20, 2021
@renovate renovate bot deleted the renovate/graphql-tools-7.x branch October 20, 2021 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant