質問編集履歴
1
エラーの解決が少し進んだのでエラー内容やタイトルを修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
nuxt.js × graphQLでの詳細ページ
|
1
|
+
nuxt.js × graphQLでの詳細ページエラー(GraphQL error: Variable $id of type ID! was provided invalid value)
|
body
CHANGED
@@ -81,7 +81,7 @@
|
|
81
81
|
</template>
|
82
82
|
|
83
83
|
<script>
|
84
|
-
import task from '~/apollo/
|
84
|
+
import task from '~/apollo/queries/getTask.gql'
|
85
85
|
|
86
86
|
export default {
|
87
87
|
data() {
|
@@ -120,19 +120,10 @@
|
|
120
120
|
|
121
121
|
|
122
122
|
### 発生している問題・エラーメッセージ
|
123
|
-
localhost:8080
|
123
|
+
実際にtaskのデータが存在するhttp://localhost:8080/tasks/5に接続すると下記エラーが出ます。
|
124
124
|
```
|
125
|
-
画面上部に下記内容が出ます
|
126
|
-
|
125
|
+
GraphQL error: Variable $id of type ID! was provided invalid value
|
127
126
|
```
|
128
|
-

|
129
127
|
|
130
|
-
実際にデータが存在するhttp://localhost:8080/tasks/5に接続すると下記エラーが出ます。
|
131
|
-
```
|
132
|
-
GraphQL error: Field 'task' doesn't exist on type 'Query' GraphQL error: Variable $id is declared by getTask but not used
|
133
|
-
```
|
134
|
-
|
135
|
-
|
128
|
+
8080/のタスク一覧ページは問題なく表示されています。
|
136
|
-

|
129
|
+

|
137
|
-
|
138
|
-
-_id.vueというファイル名がおかしいのかと疑ったのですが、nuxt.jsで他のアプリを作ったときは問題なかったのですが。
|