GraphQL.js WG ·

GraphQL.js WG meetings · Jump to notes

Agenda

View agenda on GitHub

GraphQL JS WG — May 2024

GraphQL-JS WG (Working Group) is a monthly virtual meeting of maintainers of commonly used GraphQL libraries and tools and significant contributors in the Javascript ecosystem, operated by the GraphQL Foundation. This is an open meeting in which anyone in the GraphQL community may attend.

The GraphQL-JS WG's primary purpose is to discuss and agree upon proposed changes to the GraphQL-JS reference implementation.

Attendees

NameGitHubOrganizationLocation
Benjie Gillam (Host)@benjieGraphileChandler's Ford, UK
Jovi De Croock@JoviDeCroockStellateAalst, BE
Jerel Miller@jerelmillerApollo GraphQLWindsor, CO, USA
Lenz Weber-Tronic@phryneasApolloWuerzburg, GER
Phil Pluckthun@kittenExpoLondon, UK

Agenda

  1. Agree to Membership Agreement, Participation & Contribution Guidelines and Code of Conduct (1m, Host)
  2. Introduction of attendees (5m, Host)
  3. Determine volunteers for note taking (1m, Host)
  4. Review agenda (2m, Host)
  5. Review previous meeting's action items (5m, Host)
  6. Call for reviews
    • Fragment arguments the PR leads to more of them, hopefully split up enough to digest individually.
  7. Collection of libraries and how they import from graphql
  8. implement bundling changes #4096
  9. process.env, globalThis, and typeof process

Notes

View notes on GitHub

GraphQL WG Notes - May 2024

Watch the replays: GraphQL.js Working Group Meetings on YouTube

  • Agenda link
  • Intros, agreement, etc.
  • Agenda item: Call for reviews (Jovi)
  • Agenda item: Collection of libraries and how they import from graphql (Lenz)
    • Considering bundling changes in v17 (discussed in April meeting)
    • Avoiding dual package hazard, release current v17 alpha as v18
    • Benjie noted that he wasn’t sure which exports are guaranteed documented exports
    • We explored which ones are used by the community
    • Changes introduce an exports field - missing file means breaking imports
    • Assumption was that importing from the root would be enough
    • Currently package guarantees that you can import from folders
    • Individual files are not officially guaranteed
    • Issue https://github.com/graphql/graphql-js/issues/4074
    • Pinged maintainers and brought up into the GraphQL WG
    • Participating libraries said to be okay with just importing from the root
    • A lot of them import TypeScript types that aren’t really exported
      • Most of them are simple types
    • Jovi: maybe we should leverage GitHub code search to reach out rather than wait for input
    • Phil: we collected a similar import-map for modular-graphql, which brought us to a similar conclusion that only root/folders are used.
    • Phil: biggest concern are libraries that aren’t maintained but still in use, folks have to explicitly indicate that they support graphql v17
    • Phil: https://github.com/0no-co/babel-plugin-modular-graphql
    • Lenz: can import types that are marked internal deeply
    • Phil: the Maybe/Map type shouldn’t be exposed, they are simple and won’t change
    • Suggested path forward: leave issue open and move forward with leaving the folders as an export-map
  • Agenda item: Implement bundling changes (Lenz)
    • Open pull request
    • Next week will be ready for review
    • Phil: “module” field isn’t official in the package.json - so I can see why vite and vitest behave differently
    • Lenz: you need different conditions for the types to have mts and ts because TS will start complaining in the future
    • Lenz: this pattern is established by very popular libraries, seen in Redux-Saga/Emotion/…
    • Phil: not to disqualify the credibility of who apply this pattern - there are a lot of packages that have more downloads and I can’t see everyone applying these changes
    • Phil: in urql and many other libraries we have explored solutions to this. By definition there can still be a dual package hazard as we can have duplicate installations. GraphQL would complain because of the instanceof check.
    • Phil: general concern, we are trying to fix libraries that are refusing to fix themselves
    • Lenz: my main concern is that right now it’s impossible to test GraphQL libraries - removing instanceof is a lot more effort.
  • Agenda item: process.env, globalThis, and typeof process (Lenz)
    • This ties into the point above, it would be better served by removing instanceof action item for Phil to create a proposal
    • We can fix this in GraphQL 16 so people can upgrade by reverting, using typeof process or globalThis.process
    • Meeting decision: globalThis.process
    • We’ll need accompanying documentation for bundlers, apollo already has this
  • Action items are transferred to the wg/issues