Regarding the difference in format between the createInertiaApp function and the createApp function used in the Vue Apollo documentation, this is due to the fact that Inertia.js and Vue Apollo are separate libraries with their own APIs. However, it is still possible to use both libraries together in a project.
You can add an apolloProvider to your Inertia.js application by passing it as an option to the createInertiaApp function:
import { createInertiaApp } from '@inertiajs/inertia-vue3';
import { InertiaProgress } from '@inertiajs/progress';
import { createApolloClient } from 'vue-apollo';
const apolloClient = createApolloClient({
//apollo client options
});
createInertiaApp({
//other options
setup({ el, App, props, plugin }) {
const app = createApp({ render: () => h(App, props) });
app.use(plugin);
app.use(apolloClient);
app.mount(el);
},
});