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

[release-v5] Next version of GraphQL Tools #1308

Merged
merged 57 commits into from Apr 14, 2020
Merged

[release-v5] Next version of GraphQL Tools #1308

merged 57 commits into from Apr 14, 2020

Conversation

kamilkisiela
Copy link
Collaborator

@kamilkisiela kamilkisiela commented Mar 27, 2020

This PR will track the next version of graphql-tools and is lead by @kamilkisiela from The Guild and includes all fixes/features from @yaacovCR's graphql-tools-fork (which is merged into this PR).

In order to use the new fixes, update graphql-tools to next or run:

npx match-version graphql-tools next

Please start using it today as share with us your feedback!

@yaacovCR yaacovCR mentioned this pull request Apr 1, 2020
22 tasks
@kamilkisiela
Copy link
Collaborator Author

We need this to not break TypeScript users apollographql/apollo-link#1262. Using skipLibCheck: true is a workaround, not a fix.

= refactor makeRemoteExecutableSchema default resolvers to use delegateToSchema
= return promise where required in createSubscriber
= remove unused internal Delegator type
@nohmar
Copy link

nohmar commented Apr 11, 2020

I might be missing something, but I bumped to next and now I'm receiving the following error:

Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.cjs.js" defined in the package config .../node_modules/graphql-tools/package.json

Note: I'm testing on a project running Node 13.12.0.

Using instanceOf causes problems is a project includes multiple versions of ApolloLink.
create separate folder of es utilities
remove mergeDeep from exports (to match graphql-tools v4)
es utilities do not require exporting
= do not rely on external, non-exported graphql-js types
= provide backwards compatible ExecutionResult type that retains typecast from graphql-js <v15
= add extensions property from Result type to graphql-tools ExecutionResult type
= use ExecutionResult type instead of Result
= retain Result type for backwards-compatibility
= public types should be exported for ease of use
= private types do not require aliases
= patch updates to apollo-link, tslib, and uuid
= additional updates to devDependencies
@yaacovCR
Copy link
Collaborator

@nohmar , are you able to share a reproducing minimal repository?

@kamilkisiela
Copy link
Collaborator Author

@nohmar try 5.0.0-rc.4

@yaacovCR
Copy link
Collaborator

@kamilkisiela @nohmar, package formats are beyond my pay grade, but the only thing I can think of for the underlying ERR_INVALID_PACKAGE_TARGET is that all the examples of exports field have a leading "./", see https://nodejs.org/api/esm.html#esm_package_entry_points

Parenthetically, graphql-js seems to solve the problem of supporting esm/mjs builds just by emitting ".mjs" files for both, I wonder if this will work for us, too: see graphql/graphql-js#2379

I don't really understand the underlying issues related to package formats, so please excuse the above if it makes no sense at all.

@kamilkisiela
Copy link
Collaborator Author

.mjs is experimental, so I dropped it 1fb614a

@yaacovCR
Copy link
Collaborator

I did see that, am just curious, really... We may want to reference above when mjs graduates, I suppose.

@kamilkisiela kamilkisiela merged commit 1d5a9bd into master Apr 14, 2020
@ardatan ardatan deleted the next branch April 22, 2020 23:02
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

7 participants