Skip to content

Commit

Permalink
chore: upgrade to nuxt 3 stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Diizzayy committed Dec 13, 2022
1 parent 176db25 commit 8d28576
Show file tree
Hide file tree
Showing 9 changed files with 1,322 additions and 1,429 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@
"release": "standard-version --prerelease alpha && git push --follow-tags && pnpm publish --tag next"
},
"dependencies": {
"@apollo/client": "^3.6.9",
"@nuxt/kit": "^3.0.0-rc.11",
"@nuxt/module-builder": "^0.2.0",
"@rollup/plugin-graphql": "^1.1.0",
"@apollo/client": "^3.7.1",
"@nuxt/kit": "^3.0.0",
"@nuxt/module-builder": "^0.2.1",
"@rollup/plugin-graphql": "^2.0.2",
"@vue/apollo-composable": "4.0.0-beta.1",
"cookie-es": "^0.5.0",
"defu": "^6.0.0",
"destr": "^1.2.0",
"defu": "^6.1.1",
"destr": "^1.2.1",
"graphql": "^16.5.0",
"graphql-tag": "^2.12.6",
"graphql-ws": "^5.11.2",
"jiti": "^1.15.0",
"ohash": "^0.1.5"
"ohash": "^1.0.0"
},
"devDependencies": {
"@nuxt/ui": "^0.3.3",
"@nuxtjs/eslint-config-typescript": "latest",
"eslint": "^8.25.0",
"graphql-tag": "latest",
"nuxt": "^3.0.0-rc.11",
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"eslint": "^8.28.0",
"nuxt": "^3.0.0",
"standard-version": "latest"
},
"publishConfig": {
Expand All @@ -49,5 +49,5 @@
"resolutions": {
"@nuxtjs/apollo": "link:."
},
"packageManager": "pnpm@7.9.0"
"packageManager": "pnpm@7.18.1"
}
5 changes: 2 additions & 3 deletions playground/components/GithubDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@
</template>

<script lang="ts" setup>
import gql from 'graphql-tag'
import type { ViewerT, DiscussionT } from '~/types'
import discussions from '~/queries/discussions.gql'
const { getToken, onLogin, onLogout } = useApollo()
const githubToken = ref(null)
const githubToken = ref<string | null>(null)
// for testing with cookie `tokenStorage`
if (process.server) { githubToken.value = await getToken('github') }
Expand Down Expand Up @@ -82,7 +81,7 @@ const getViewer = () => {
const getNuxtDiscussions = () => {
const { onResult, onError } = useQuery<DiscussionT>(discussions, null, { clientId: 'github', fetchPolicy: 'cache-and-network' })
onResult(r => (output.value = r.data.repository.discussions.nodes))
onResult(r => (output.value = r.data.repository?.discussions?.nodes))
onError(err => (output.value = err))
}
Expand Down
5 changes: 2 additions & 3 deletions playground/components/StarlinkDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
</template>

<script lang="ts" setup>
import gql from 'graphql-tag'
// @ts-ignore
import queryLaunches from '~/queries/launches.gql'
Expand All @@ -41,9 +40,9 @@ const { result, restart, loading } = useQuery(queryShips)
const getShips = () => restart()
const { load, onError, refetch, result: launchResult } = useLazyQuery(queryLaunches)
watch(launchResult, (v) => (result.value = v))
watch(launchResult, v => (result.value = v))
onError((e) => console.error(e))
onError(e => console.error(e))
const getLaunches = () => !launchResult.value ? load() : refetch()
</script>
2 changes: 0 additions & 2 deletions playground/components/TodosDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
</template>

<script lang="ts" setup>
import gql from 'graphql-tag'
const gqlTodos = gql`query todo { todos { id text } }`
const gqlCreateTodo = gql`mutation createTodo($todo: TodoInput!) { createTodo(todo: $todo) { id } }`
const gqlTodoAdded = gql`subscription todoAdded { todoAdded { id text } }`
Expand Down
Loading

0 comments on commit 8d28576

Please sign in to comment.