Skip to content

Commit

Permalink
Merge pull request #5 from rpitv/add-graphql
Browse files Browse the repository at this point in the history
Added GraphQL client w/ IDE introspection
  • Loading branch information
robere2 committed Dec 15, 2023
1 parent 81a3eae commit 5e0b096
Show file tree
Hide file tree
Showing 6 changed files with 4,471 additions and 685 deletions.
3 changes: 3 additions & 0 deletions apps/glimpse-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ sw.*

# Vim swap files
*.swp

# API Schema Introspection
./api-schema.graphql
15 changes: 15 additions & 0 deletions apps/glimpse-ui/.graphqlconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "RPI TV Schema",
"schemaPath": "./api-schema.graphql",
"extensions": {
"endpoints": {
"RPI TV Glimpse API": {
"url": "http://localhost:4000/graphql",
"headers": {
"user-agent": "JS GraphQL"
},
"introspect": true
}
}
}
}
19 changes: 17 additions & 2 deletions apps/glimpse-ui/components/RecentProductionsList.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
<template>
<div class="past-prod-list">
<VSkeletonLoader v-for="n in 10" :index="n" type="card, list-item-two-line" class="past-prod-card" boilerplate />
<VSkeletonLoader
v-for="n in 10"
:index="n"
:key="n"
type="card, list-item-two-line"
class="past-prod-card"
boilerplate
/>
</div>
</template>

<script>
import gql from 'graphql-tag'
export default {
name: 'RecentProductionsList'
name: 'RecentProductionsList',
apollo: {
productions: gql`query { productions {
name
id
}}`
}
}
</script>

Expand Down
12 changes: 11 additions & 1 deletion apps/glimpse-ui/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,18 @@ export default {
'@nuxtjs/axios',
'@nuxtjs/pwa',
// Doc: https://github.com/nuxt-community/dotenv-module
'@nuxtjs/dotenv'
'@nuxtjs/dotenv',
'@nuxtjs/apollo'
],
apollo: {
clientConfigs: {
default: {
// required
httpEndpoint: 'http://localhost:4000/graphql'
}
}
},

/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
Expand Down
Loading

0 comments on commit 5e0b096

Please sign in to comment.