Skip to content

v5.0.0 - yaacovCR

Compare
Choose a tag to compare
@kamilkisiela kamilkisiela released this 14 Apr 14:41
c35d0aa

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