Skip to content

Commit

Permalink
A few more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Apr 22, 2022
1 parent 044e378 commit d829c11
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 41 deletions.
13 changes: 13 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ tasks:
env:
DATABASE_URL: postgresql://gitpod@localhost/jabrefonline

vscode:
# Add handy VS Code extensions: https://www.gitpod.io/docs/ides-and-editors/vscode-extensions
extensions:
- johnsoncodehk.volar
- dbaeumer.vscode-eslint
- GitHub.copilot
- eamodio.gitlens
- GraphQL.vscode-graphql
- Orta.vscode-jest
- esbenp.prettier-vscode
- Prisma.prisma
- bradlc.vscode-tailwindcss

# Expose ports: https://www.gitpod.io/docs/config-ports/
ports:
# Redis
Expand Down
2 changes: 1 addition & 1 deletion components/DetailPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
</template>
<script lang="ts">
import { defineComponent, computed } from '@vue/composition-api'
import { defineComponent, computed } from 'vue'
import { useUiStore } from './../store'
export default defineComponent({
Expand Down
2 changes: 1 addition & 1 deletion components/DocumentEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@
</template>

<script lang="ts">
import { defineComponent, computed } from '@vue/composition-api'
import { useResult, useQuery } from '@vue/apollo-composable'
import { defineComponent, computed } from 'vue'
import Tags from './tagify.vue'
import { gql } from '~/apollo'
Expand Down
2 changes: 1 addition & 1 deletion components/DocumentEditorHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</p>
</template>
<script lang="ts">
import { defineComponent } from '@vue/composition-api'
import { defineComponent } from 'vue'
export default defineComponent({
props: { heading: { type: String, default: '' } },
Expand Down
2 changes: 1 addition & 1 deletion components/DocumentEditorInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</template>

<script lang="ts">
import { defineComponent } from '@vue/composition-api'
import { defineComponent } from 'vue'
export default defineComponent({
props: {
value: {
Expand Down
8 changes: 1 addition & 7 deletions components/DocumentView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,7 @@
</template>

<script lang="ts">
import {
defineComponent,
PropType,
ref,
computed,
toRefs,
} from '@vue/composition-api'
import { PropType, defineComponent, ref, computed, toRefs } from 'vue'
import { gql, DocumentType } from '~/apollo'
import { useUiStore } from '~/store'
Expand Down
2 changes: 1 addition & 1 deletion components/HorizontalRule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/>
</template>
<script lang="ts">
import { defineComponent } from '@vue/composition-api'
import { defineComponent } from 'vue'
export default defineComponent({
props: {
content: {
Expand Down
4 changes: 2 additions & 2 deletions components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@

<script lang="ts">
import { useApolloClient, useMutation } from '@vue/apollo-composable'
import { defineComponent, ref, watch } from '@vue/composition-api'
import { navigateTo, useRouter } from '#app'
import { defineComponent, ref, watch } from 'vue'
import { navigateTo } from '#app'
import { gql } from '~/apollo'
import { useUiStore } from '~/store'
import { cacheCurrentUser } from '~/apollo/cache'
Expand Down
2 changes: 1 addition & 1 deletion components/PasswordInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</div>
</template>
<script lang="ts">
import { computed, defineComponent, ref } from '@vue/composition-api'
import { computed, defineComponent, ref } from 'vue'
export default defineComponent({
props: {
Expand Down
2 changes: 1 addition & 1 deletion components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@
</div>
</template>
<script lang="ts">
import { defineComponent } from '@vue/composition-api'
import { useResult, useQuery } from '@vue/apollo-composable'
import { BaseTree } from '@he-tree/vue3'
import { defineComponent } from 'vue'
import { gql } from '~/apollo'
import { useUiStore } from '~/store'
import '@he-tree/vue3/dist/he-tree-vue3.css'
Expand Down
2 changes: 1 addition & 1 deletion components/tagify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script lang="ts">
import Tagify from '@yaireo/tagify'
import '@yaireo/tagify/dist/tagify.css'
import { defineComponent, PropType } from '@vue/composition-api'
import { defineComponent, PropType } from 'vue'
export default defineComponent({
name: 'TagsInput',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"ts-node": "^10.7.0",
"tsyringe": "^4.6.0",
"typescript": "^4.6.3",
"vue-apollo": "^3.1.0",
"@supertiger/vue-3-virtual-scroll-list": "^1.0.8"
},
"devDependencies": {
Expand Down
11 changes: 3 additions & 8 deletions plugins/apollo.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import VueApollo from 'vue-apollo'
import { ApolloClient, HttpLink } from '@apollo/client/core'
import fetch from 'cross-fetch'
import { onError } from '@apollo/client/link/error'
import { logErrorMessages } from '@vue/apollo-util'
import { provideApolloClient } from '@vue/apollo-composable'
import { DefaultApolloClient } from '@vue/apollo-composable'
import { cache } from '../apollo/cache'
import { defineNuxtPlugin, useRuntimeConfig } from '#app'
import { Environment } from '~/config'
Expand All @@ -13,7 +12,6 @@ export default defineNuxtPlugin((nuxtApp) => {
// For some strange reason, nuxtApp is not defined for storybook, so don't do anything in this case
return
}
nuxtApp.vueApp.use(VueApollo)

const config = useRuntimeConfig()
let httpLink
Expand All @@ -38,9 +36,6 @@ export default defineNuxtPlugin((nuxtApp) => {
credentials: 'include',
})

const apolloProvider = new VueApollo({
defaultClient: apolloClient,
})

provideApolloClient(apolloProvider?.defaultClient)
// provideApolloClient(apolloClient)
nuxtApp.vueApp.provide(DefaultApolloClient, apolloClient)
})
8 changes: 7 additions & 1 deletion server/api/index.ts → server/api/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import {
ApolloServerPluginDrainHttpServer,
ApolloServerPluginLandingPageLocalDefault,
} from 'apollo-server-core'
import { defineEventHandler } from 'h3'
import { Environment } from '../../config'
import { configure as configureTsyringe } from '../tsyringe.config'
import { buildContext } from '../context'
import { loadSchema } from '../schema'
import PassportInitializer from '../user/passport-initializer'
import { useRuntimeConfig } from '#app'
const config = useRuntimeConfig().public

// Create express instance
Expand Down Expand Up @@ -48,4 +50,8 @@ void configureTsyringe().then(() => {
void startServer()
})

export default app
export default defineEventHandler((event) => {
return {
api: 'works',
}
})
14 changes: 0 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18330,11 +18330,6 @@ throat@^6.0.1:
resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375"
integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==

throttle-debounce@^2.1.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.3.0.tgz#fd31865e66502071e411817e241465b3e9c372e2"
integrity sha512-H7oLPV0P7+jgvrk+6mwwwBDmxTaxnu9HMXmloNLXwnNO0ZxZ31Orah2n8lU1eMPvsaowP2CX+USCgyovXfdOFQ==

throttle-debounce@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-3.0.1.tgz#32f94d84dfa894f786c9a1f290e7a645b6a19abb"
Expand Down Expand Up @@ -19380,15 +19375,6 @@ vscode-uri@^3.0.2:
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.3.tgz#a95c1ce2e6f41b7549f86279d19f47951e4f4d84"
integrity sha512-EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA==

vue-apollo@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/vue-apollo/-/vue-apollo-3.1.0.tgz#d0370b64f928f488b7ad98177cca8e1a82fa725e"
integrity sha512-TkXMpgypbqM/27vKIpWNhL347QRtcu9kWkEmxplPGGMnZb+hSbbIwU07LjQVzFwrLBer0ha9zJP4hIW/fCQDuw==
dependencies:
chalk "^2.4.2"
serialize-javascript "^4.0.0"
throttle-debounce "^2.1.0"

vue-bundle-renderer@^0.3.6:
version "0.3.6"
resolved "https://registry.yarnpkg.com/vue-bundle-renderer/-/vue-bundle-renderer-0.3.6.tgz#1ab5be2c1d1c608e48673596fbc89d50c038830f"
Expand Down

0 comments on commit d829c11

Please sign in to comment.