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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/issue 278 graphql plugin #487

Merged
merged 29 commits into from
Mar 19, 2021

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Mar 8, 2021

Related Issue

resolves #278

Summary of Changes

  1. Created graphql package, and moved data/ folder from cli package
  2. Upgraded <app-header> and <app-shelf> components to use client
  3. Upgraded to Apollo 3 *
  4. Found a bug with rollup load handling for serving custom resources
  5. Restored test cases / unit test, moved under plugin-graphql and improved to cover all query cases

graphiql

TODOs

  1. Enable Unit Tests / Specs
  2. Documentation
  3. Review status of reduce duplicate fetches for cache.json by storing in client.js memory聽#347 and data client is not rehydrating from existing WINDOW.APOLLO_STATE on initial load聽#349
  4. @apollo/client support in client.js (see thoughts below) - added as a Roadmap to 1.0 Tracking item
  5. clean up example code / TODOs / commented out code
  6. Track open items

Thoughts / Questions

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

Refactoring / Tracking Items

All tracked under Road to 1.0 list in #418

  1. need to ensure a clear distinction between when file extensions are / aren't needed when using import as the spec says they should always be there but for now, will make it so node_modules can be bare, and can make an issue to add support for bare module specifier as a plugin
  2. should create implement shared package.json dependency walker for importMaps like in plugin-babel / regenerator-runtime
  3. Currently need to have distinction between common and server client's until we can get to node v14 where we can use import on NodeJS code
  4. Should really implement server.stop handling on process end
  5. try and avoid need for createCache round-robin 馃惁

@thescientist13 thescientist13 added question Further information is requested P0 Critical issue that should get addressed ASAP Plugins Greenwood Plugins CLI Data Data and GraphQL labels Mar 8, 2021
@thescientist13 thescientist13 linked an issue Mar 8, 2021 that may be closed by this pull request
5 tasks
@thescientist13 thescientist13 self-assigned this Mar 8, 2021
@thescientist13
Copy link
Member Author

Took a little time to look into #347 and #349 to see if there were any quick wins but there as the new baseline is specifically targeted towards SSG, there would at least need to be an MPA (or SPA) option in place in order to be able to keep existing data in memory, since as of right now, every page is a hard load. Will move those two issues to deferred and will plan to schedule them for the next Project.

@thescientist13
Copy link
Member Author

Was hoping closing and reopening would trigger a Netlify build a la #489 but didn't seem to happen. Maybe because no change in git hash?

@thescientist13 thescientist13 force-pushed the enhancement/issue-278-graphql-plugin branch from 11acd31 to 6164d82 Compare March 19, 2021 00:27
@thescientist13 thescientist13 merged commit ea29f6d into release/0.10.0 Mar 19, 2021
@thescientist13 thescientist13 deleted the enhancement/issue-278-graphql-plugin branch March 19, 2021 00:35
thescientist13 added a commit that referenced this pull request Apr 3, 2021
* init commit of WIP with server and graphiql working

* WIP client side implementation

* output message when processing a commonjs file

* debug statement

* custom graphql client

* restore graphQL to shelf

* refactor shelf

* rollup bundling working

* graphql working in production build

* upgrade backend apollo 3

* move and re-enable data unit tests

* align server start usage with develop command

* fixed bug with dangling commas in es-modules-shims

* add new config query test case

* tests for menu query for navigation

* clean up

* add support for children query aliasing

* children query specs

* cleanup

* graph query test cases and support

* delete old cases

* console cleanup

* fix label confusion and restore id

* remove frontmatter

* refactoring and promisifying

* graph test with custom frontmatter

* restore docs

* remove example config query

* delete commented out code
thescientist13 added a commit that referenced this pull request Apr 3, 2021
* init commit of WIP with server and graphiql working

* WIP client side implementation

* output message when processing a commonjs file

* debug statement

* custom graphql client

* restore graphQL to shelf

* refactor shelf

* rollup bundling working

* graphql working in production build

* upgrade backend apollo 3

* move and re-enable data unit tests

* align server start usage with develop command

* fixed bug with dangling commas in es-modules-shims

* add new config query test case

* tests for menu query for navigation

* clean up

* add support for children query aliasing

* children query specs

* cleanup

* graph query test cases and support

* delete old cases

* console cleanup

* fix label confusion and restore id

* remove frontmatter

* refactoring and promisifying

* graph test with custom frontmatter

* restore docs

* remove example config query

* delete commented out code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking CLI Data Data and GraphQL documentation Greenwood specific docs P0 Critical issue that should get addressed ASAP Plugins Greenwood Plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQL (Apollo) data as its own package
1 participant