Skip to content
Snippets Groups Projects
Verified Commit 98d12281 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Use graphql-loader

parent 91bba64b
No related branches found
No related tags found
1 merge request!1045Introduce Vuetify and GraphQL
Pipeline #80016 failed
<template>
<ApolloMutation
:mutation="gql => gql`
mutation ($id: ID!) {
markNotificationRead(id: $id) {
notification {
id
read
}
}
}
`"
:mutation="require('./markNotificationRead.graphql')"
:variables="{ id: this.notification.id }"
>
<template v-slot="{ mutate, loading, error }">
......
<template>
<ApolloQuery
:query="gql => gql`{
myNotifications: whoAmI {
notifications {
id
title
description
link
created
sender
}
}
}`"
:query="require('./myNotifications.graphql')"
:pollInterval="1000"
>
<template v-slot="{ result: { error, data }, isLoading }">
......
mutation ($id: ID!) {
markNotificationRead(id: $id) {
notification {
id
read
}
}
}
{
myNotifications: whoAmI {
notifications {
id
title
description
link
created
sender
}
}
}
......@@ -59,6 +59,11 @@ module.exports = {
},
],
},
{
test: /\.(graphql|gql)$/,
exclude: /node_modules/,
loader: 'graphql-tag/loader',
},
],
},
optimization: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment