Skip to content

Instantly share code, notes, and snippets.

@flybayer
Created December 13, 2022 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flybayer/62d520a222141fa739b98381e0eb480e to your computer and use it in GitHub Desktop.
Save flybayer/62d520a222141fa739b98381e0eb480e to your computer and use it in GitHub Desktop.
import { AuthClientPlugin } from "@blitzjs/auth"
import { setupBlitzClient } from "@blitzjs/next"
import { BlitzRpcPlugin, getQueryClient } from "@blitzjs/rpc"
export const { withBlitz } = setupBlitzClient({
plugins: [
AuthClientPlugin({
cookiePrefix: "web-cookie-prefix",
}),
BlitzRpcPlugin({
reactQueryOptions: {
mutations: {
onSuccess: () => {
const queryClient = getQueryClient()
void queryClient.invalidateQueries()
},
},
},
}),
],
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment