Aircraft CRUD
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
import {ApolloClient, ApolloLink, HttpLink, InMemoryCache} from '@apollo/client/core'
|
||||
import {createApolloProvider} from "@vue/apollo-option";
|
||||
import { createUploadLink } from 'apollo-upload-client';
|
||||
|
||||
const httpLink = new HttpLink({
|
||||
uri: 'http://localhost:8000/graphql',
|
||||
credentials: 'include'
|
||||
})
|
||||
|
||||
const uploadLink = createUploadLink({
|
||||
uri: 'http://localhost:8000/graphql',
|
||||
credentials: 'include'
|
||||
})
|
||||
|
||||
export const apolloClient = new ApolloClient({
|
||||
link: ApolloLink.from([httpLink]),
|
||||
link: ApolloLink.from([uploadLink]),
|
||||
cache: new InMemoryCache(),
|
||||
connectToDevTools: true,
|
||||
})
|
||||
@@ -24,6 +30,7 @@ export const apolloWrapper = {
|
||||
console.error("Error during query: ", err)
|
||||
})
|
||||
},
|
||||
|
||||
mutate(mutation, variables, onUpdate = () => {}) {
|
||||
return apolloClient
|
||||
.mutate({
|
||||
|
||||
Reference in New Issue
Block a user