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

feat!: Support Nuxt 3 #430

Merged
merged 34 commits into from
Oct 8, 2022
Merged

feat!: Support Nuxt 3 #430

merged 34 commits into from
Oct 8, 2022

Conversation

Diizzayy
Copy link
Collaborator

@Diizzayy Diizzayy commented Jul 30, 2022

This PR introduces a variety of changes, many of which are in-fact breaking changes.

The first and perhaps biggest being the adaptation of Vue 3 using Vue Apollo v4

Changes

  • clientConfigs is now clients
  • authenticationType is now authType
  • tokenName defaults to apollo:<client-name>.token
  • proxyCookies flag
  • authHeader support
  • tokenStorage - ( cookie or localStorage )
  • defineApolloClient helper
  • auto imports gql wrapper and apollo composables
  • new apollo:auth hook; replaces getAuth
  • new apollo:error hook; replaces global errorHandler
  • Improved auth integration via cookie and localStorage
  • Migrated from subscriptions-transport-ws to GraphQLWsLink via graphql-ws
  • Improved loading of .gql / .graphql files (Vite & Webpack)
  • Improved SSR support
  • Proper documentation site
  • HMR for external client config files ( Greatly improves DX )
  • support for Vue Apollo Composables ie: useQuery, useMutation, useSubscription, etc...

Closes #312
Closes #297
Closes #426

@Diizzayy Diizzayy marked this pull request as ready for review July 31, 2022 17:12
@Diizzayy Diizzayy marked this pull request as draft July 31, 2022 17:13
@dargmuesli dargmuesli mentioned this pull request Jul 31, 2022
@Diizzayy Diizzayy marked this pull request as ready for review August 2, 2022 15:34
@atinux
Copy link
Contributor

atinux commented Aug 12, 2022

I reviewed the docs and looks good to me now.

Beautiful work ❤️

@Diizzayy Diizzayy self-assigned this Aug 12, 2022
@slavanossar
Copy link
Contributor

Had some time to play around with this and test it out on a demo project, working really nicely. I'm not sure how useful I'll be, but if you need any help with testing or anything else let me know.

Thanks @Diizzayy and anyone else who has contributed, amazing work in putting this together!

@Diizzayy Diizzayy changed the base branch from master to v5 August 20, 2022 13:50
@joshistoast
Copy link

joshistoast commented Sep 9, 2022

Had some time to play around with this and test it out on a demo project, working really nicely. I'm not sure how useful I'll be, but if you need any help with testing or anything else let me know.

Thanks @Diizzayy and anyone else who has contributed, amazing work in putting this together!

Would love to play with this but having difficulties with upstream dependency conflicts, how'd you install it? Would also love to know what's hindering this from being merged.

@slavanossar
Copy link
Contributor

Had some time to play around with this and test it out on a demo project, working really nicely. I'm not sure how useful I'll be, but if you need any help with testing or anything else let me know.
Thanks @Diizzayy and anyone else who has contributed, amazing work in putting this together!

Would love to play with this but having difficulties with upstream dependency conflicts, how'd you install it? Would also love to know what's hindering this from being merged.

I was also having issues so my installation is semi-manual, I'm only using it for testing at the moment so it's not critical to have it working seamlessly just yet:

  1. Add branch as dependency
yarn add Diizzayy/apollo-module#chore/nuxt3
  1. Separately clone branch, install packages and build /dist
pnpm install && pnpm build

The build step would fail for me when doing it from node_modules/@nuxtjs/apollo within repository

  1. Copy /dist files to something like lib/apollo-module in repository
  2. Specify postinstall script in package.json
{
  "scripts": {
    "postinstall": "cp -R lib/apollo-module node_modules/@nuxtjs/apollo/dist"
  }
}

Obviously this requires completing steps 2 & 3 again as updates are pushed to the branch.

@dwin0
Copy link

dwin0 commented Oct 3, 2022

@Diizzayy Thanks for putting in the effort to make it compatible with Nuxt 3!
@kieusonlam, when will this change be merged into v5 and when do you plan to make v5 official?

@Diizzayy
Copy link
Collaborator Author

Diizzayy commented Oct 3, 2022

@dwin94 This will be merged and released under v5 soon enough.

@Luferov
Copy link

Luferov commented Oct 6, 2022

waiting for a stable release of nuxt?

@Diizzayy Diizzayy merged commit 4321552 into nuxt-modules:v5 Oct 8, 2022
@bmulholland bmulholland mentioned this pull request Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants