Skip to content

Commit 8914f91

Browse files
committed
Merge pull request #5 from rpitv/add-graphql
Added GraphQL client w/ IDE introspection
1 parent 14f9a0d commit 8914f91

File tree

6 files changed

+4471
-685
lines changed

6 files changed

+4471
-685
lines changed

apps/glimpse-ui/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,6 @@ sw.*
8989

9090
# Vim swap files
9191
*.swp
92+
93+
# API Schema Introspection
94+
./api-schema.graphql

apps/glimpse-ui/.graphqlconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "RPI TV Schema",
3+
"schemaPath": "./api-schema.graphql",
4+
"extensions": {
5+
"endpoints": {
6+
"RPI TV Glimpse API": {
7+
"url": "http://localhost:4000/graphql",
8+
"headers": {
9+
"user-agent": "JS GraphQL"
10+
},
11+
"introspect": true
12+
}
13+
}
14+
}
15+
}

apps/glimpse-ui/components/RecentProductionsList.vue

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
<template>
22
<div class="past-prod-list">
3-
<VSkeletonLoader v-for="n in 10" :index="n" type="card, list-item-two-line" class="past-prod-card" boilerplate />
3+
<VSkeletonLoader
4+
v-for="n in 10"
5+
:index="n"
6+
:key="n"
7+
type="card, list-item-two-line"
8+
class="past-prod-card"
9+
boilerplate
10+
/>
411
</div>
512
</template>
613

714
<script>
15+
import gql from 'graphql-tag'
16+
817
export default {
9-
name: 'RecentProductionsList'
18+
name: 'RecentProductionsList',
19+
apollo: {
20+
productions: gql`query { productions {
21+
name
22+
id
23+
}}`
24+
}
1025
}
1126
</script>
1227

apps/glimpse-ui/nuxt.config.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,18 @@ export default {
6464
'@nuxtjs/axios',
6565
'@nuxtjs/pwa',
6666
// Doc: https://github.com/nuxt-community/dotenv-module
67-
'@nuxtjs/dotenv'
67+
'@nuxtjs/dotenv',
68+
'@nuxtjs/apollo'
6869
],
70+
apollo: {
71+
clientConfigs: {
72+
default: {
73+
// required
74+
httpEndpoint: 'http://localhost:4000/graphql'
75+
}
76+
}
77+
},
78+
6979
/*
7080
** Axios module configuration
7181
** See https://axios.nuxtjs.org/options

0 commit comments

Comments
 (0)