Skip to content

Commit 4b10ffd

Browse files
feat: add apollo requests
1 parent 3b6bcea commit 4b10ffd

File tree

10 files changed

+125
-89
lines changed

10 files changed

+125
-89
lines changed

graphql.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
declare module '*.gql' {
2+
import { DocumentNode } from 'graphql'
3+
const Schema: DocumentNode
4+
5+
export = Schema
6+
}

package-lock.json

Lines changed: 36 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
1414
},
1515
"dependencies": {
16+
"@apollo/client": "^3.6.9",
1617
"@vue/apollo-composable": "^4.0.0-alpha.18",
1718
"@vueuse/core": "^8.9.2",
19+
"graphql": "^16.5.0",
1820
"graphql-tag": "^2.12.6",
1921
"lodash-es": "^4.17.21",
2022
"pinia": "^2.0.16",
@@ -38,6 +40,7 @@
3840
"@progress/kendo-vue-layout": "^3.4.0",
3941
"@progress/kendo-vue-notification": "^3.4.0",
4042
"@progress/kendo-vue-popup": "^3.4.0",
43+
"@rollup/plugin-graphql": "^1.1.0",
4144
"@rushstack/eslint-patch": "^1.1.0",
4245
"@types/jsdom": "^16.2.14",
4346
"@types/lodash-es": "^4.17.6",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fragment Board on Board {
2+
id
3+
title
4+
image {
5+
downloadUrl
6+
}
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#import "../fragments/board.fragment.gql"
2+
3+
mutation createBoard($data: BoardCreateInput!) {
4+
boardCreate(data: $data) {
5+
...Board
6+
}
7+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#import "../fragments/board.fragment.gql"
2+
3+
query BoardsList {
4+
boardsList {
5+
items {
6+
...Board
7+
}
8+
}
9+
}

0 commit comments

Comments
 (0)