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

add full client API support for Apollo client in plugin-graphql (as ESM) #535

Closed
1 of 5 tasks
thescientist13 opened this issue Apr 11, 2021 · 5 comments
Closed
1 of 5 tasks
Labels
Content as Data enhancement Improve something existing (e.g. no docs, new APIs, etc) Plugins Greenwood Plugins
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Apr 11, 2021

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

EDIT: not sure if this still applies anymore since i think we're OK with putting this plugin into "read only" mode, and so not really designed for mutations, only reads. Will revisit closer to 1.0 release.

As part of introducing the GraphQL plugin in #487, for various reasons, it wasn't possible to support @apollo/client completely, and so only a minimal API surface is available right now, essentially consisting of just a query method taking two params; query and variables.

Details

The main issue was due to ESM handling as I don't think all of Apollo's dependencies, including transitive, are fully ESM compliant.

This is an excerpt from the linked issue

Apollo Client

There were a number of issues / hacks / workarounds I bumped into while trying to use @apollo/client in client.js so I have put that work into a branch for now, but will still try and kick the tires for a bit longer

no-default-export-console no-default-export-source ts-invariant-shim

Ultimately landed on this bug, same thing happened in apollo-client. 😞

observable-constructor-new
@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) Plugins Greenwood Plugins Content as Data labels Apr 11, 2021
@thescientist13 thescientist13 added this to the 1.0 milestone Apr 11, 2021
@thescientist13 thescientist13 changed the title add full API support for Apollo client in plugin-graphql add full client API support for Apollo client in plugin-graphql Apr 11, 2021
@thescientist13
Copy link
Member Author

Looks like there may be an RC we can opt into that might resolve our issues. 🤞
apollographql/apollo-client#7610 (comment)

@thescientist13 thescientist13 changed the title add full client API support for Apollo client in plugin-graphql add full client API support for Apollo client in plugin-graphql (as ESM) Jul 12, 2021
@thescientist13
Copy link
Member Author

thescientist13 commented Aug 31, 2021

In light of needing #532 as part of #576 and the fact that as v3.4 Apollo should support all of ESM, might be worth working on this now.

@thescientist13
Copy link
Member Author

thescientist13 commented Dec 16, 2021

Better diff, since I think the branch got deleted? Or else I may still have it locally.

I think this can be looked into, but maybe better to wait until after #815 is merged first and after #537 ? We will need to lift deps of deps into the import map, and right now that import map is being managed manually. 😮‍💨

@thescientist13
Copy link
Member Author

Per #952 / #1157 , we have marked this plugin specifically as read only and so mutations are not really in scope

@thescientist13 thescientist13 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in [Greenwood] Phase 11 - Burndown to 1.0 Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content as Data enhancement Improve something existing (e.g. no docs, new APIs, etc) Plugins Greenwood Plugins
Projects
None yet
Development

No branches or pull requests

1 participant