Skip to content

Outstanding breaking changes in buildClientSchema #2005

Closed
@trevor-scheer

Description

@trevor-scheer

This issue is a follow-up to an ongoing problem with breaking changes in buildClientSchema.

A breakdown of events

  • v<14.2.0: buildClientSchema pulls in only the built-in scalar types that are referenced within the schema.
  • v14.2.0: buildClientSchema doesn't pull in any built-in scalar types. (original breaking change)
  • v14.2.1-14.3.0: buildClientSchema pulls in all of the built-in scalar types, whether they're referenced within the schema or not. The fix addressed one issue, but introduced another and added unintended behavior.
  • 14.3.1-14.4.1 (latest): buildClientSchema doesn't add any built-in scalars, meaning the schema must be provided complete. We previously depended on pre-14.2.0 behavior, this is a break that we could only work around by pulling in the missing scalars ourselves before calling buildClientSchema.

History and related links

Reproduction

https://github.com/trevor-scheer/buildClientSchema-changes

Install and run

yarn
node index.js

The included schema for demonstration intentionally leaves out all built-in types in order to show how behavior changed over time. There is a field in the schema which depends on the Int type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions