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

[legacy-framework] Next.js Fork Migration: Move query/mutation support into nextjs core #2516

Merged
merged 58 commits into from
Aug 16, 2021

Conversation

flybayer
Copy link
Member

@flybayer flybayer commented Jun 19, 2021

What are the changes and their implications?

This is a huge step towards removing our custom compiler (and 1.0) by moving query/mutation support into nextjs core!

This implements the autogenerate route change discussed in #2010. This is a breaking change for anyone manually calling these routes.

-/api/auth/mutations/login
+/api/rpc/login
-/api/modules/users/queries/getUsers
+/api/rpc/getUsers

It also adds ability to version queries/mutations (also talked about in the above discussion)

FILE:    app/users/mutations/createUser.ts
API URL: /api/rpc/createUser

FILE:    app/users/mutations/v2/createUser.ts
API URL: /api/rpc/v2/createUser

  • Query/mutation resolvers functioning
  • Client build step step
  • Global middleware
  • Local middleware
  • invokeWithMiddleware
  • move auth to core
  • Re-enable auth integration with RPC
  • Move react-query stuff to core
  • Move BlitzProvider to core
  • Re-enable RQ integration with RPC
  • Get blitz build working again
  • Server logging
    • invokeWithMiddleware (DRY with rpcMiddleware)
    • rpcMiddleware
    • All API requests
  • Fix invokeWithMiddleware to use resolver name
  • Disable .warm feature
  • Update getQueryKey
  • NEXT_API_REQUEST -> BLITZ_API_REQUEST
  • Update RPC specification docs
  • Mark as breaking change release
  • Test on Vercel

Base automatically changed from fork to canary June 24, 2021 17:37
@flybayer flybayer changed the title Move query/mutation support into nextjs core Next.js Fork Migration: Move query/mutation support into nextjs core Jul 5, 2021
@flybayer flybayer merged commit f6354d2 into canary Aug 16, 2021
@flybayer flybayer deleted the fork-rpc branch August 16, 2021 22:56
@flybayer
Copy link
Member Author

PR reviews still welcome, even though this is merged!

@flybayer
Copy link
Member Author

This change is available in https://github.com/blitz-js/blitz/releases/tag/v0.40.0-canary.0. Please test and report any issues!

@sam3d
Copy link

sam3d commented Aug 17, 2021

Amazing news!

@itsdillon itsdillon changed the title Next.js Fork Migration: Move query/mutation support into nextjs core [legacy-framework] Next.js Fork Migration: Move query/mutation support into nextjs core Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants