Created
December 13, 2022 16:03
-
-
Save flybayer/62d520a222141fa739b98381e0eb480e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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