Vue apollo client keeps getting self-signed certificate error
Asked Answered
I

0

1

I'm new to vue-apollo 4 and I just can't get it to work with my simple Graphql API

I already:

 - allowed edge://flags/#allow-insecure-localhost (enabled)
 - created and added to trusted authories certicates (windows)
 - package.json scripts: "dev": "set NODE_TLS_REJECT_UNAUTHORIZED=0 && nuxt dev --https --ssl-cert server.crt --ssl-key server.key"

My simple apollo api: enter image description here

On my app.vue

<script lang="ts" setup>
import { useQuery, useResult } from '@vue/apollo-composable'


import { gql } from 'graphql-tag'
const ql = gql`
query{
   hello
}
`
const { loading, result } = useQuery(ql)
console.log(result)

It always generates enter image description here

Inconsonant answered 30/3, 2023 at 4:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.