Skip to content

Commit

Permalink
feat: better graphql pages titles
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Jan 2, 2024
1 parent 66f4378 commit 712e836
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/app/pages/graphql.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ useSaveRoute({
name: 'graphql-schema',
},
})
useHead({
titleTemplate: title => title ? `GraphQL ${title}` : 'GraphQL',
})
</script>

<template>
<div class="flex divide-x divide-gray-300 dark:divide-gray-700">
<Head>
<Title>GraphQL</Title>
</Head>

<UVerticalNavigation
:links="[
{
Expand Down
4 changes: 4 additions & 0 deletions packages/app/pages/graphql/playground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ const { data, refresh } = await useFetch('/api/server')
onWindowFocus(refresh)
const graphqlServer = computed(() => data.value?.routeInfos.find(item => item.type === 'graphql'))
useHead({
title: 'Playground',
})
</script>

<template>
Expand Down
4 changes: 4 additions & 0 deletions packages/app/pages/graphql/schema.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<script lang="ts" setup>
const { data, error, refresh } = await useFetch('/api/graphql/schema/inspect')
onWindowFocus(refresh)
useHead({
title: 'Schema',
})
</script>

<template>
Expand Down

0 comments on commit 712e836

Please sign in to comment.