Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer possible to use a relative url #507

Open
PssbleTrngle opened this issue May 10, 2023 · 1 comment
Open

No longer possible to use a relative url #507

PssbleTrngle opened this issue May 10, 2023 · 1 comment
Labels

Comments

@PssbleTrngle
Copy link

Environment

  • Operating System: Windows_NT
  • Node Version: v18.13.0
  • Nuxt Version: 3.4.3
  • Nitro Version: 2.3.3
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: modules, postcss, css, nitro, build, apollo, i18n, formkit, tailwindcss, typescript
  • Runtime Modules: ./modules/assets, @nuxtjs/apollo@5.0.0-alpha.6, @nuxtjs/color-mode@3.2.0, @nuxtjs/tailwindcss@6.6.7, @formkit/nuxt@0.16.5, @nuxtjs/i18n@8.0.0-beta.11
  • Build Modules: -

Describe the bug

In previous versions, it was possible to use a relative httpEndpoint url.
In development, this could get redirected using the nitro proxy.
With the newest release, I now get the error Failed to parse URL from /api/graphql

Expected behaviour

A relative url should also be a viable input for the httpEndpoint property

Reproduction

apollo.config.ts

export default defineApolloClient({
   httpEndpoint: '/api/graphql'
})

next.config.ts

   ...
   nitro: {
      devProxy: {
         '/api': 'http://localhost:8080/api',
      },
   },

Additional context

No response

Logs

500
Failed to parse URL from /api/graphql

at C:\Users\niwi\Desktop\Repos\Personal\Atlas\node_modules\@apollo\client\core\QueryManager.js:679:19
at both (C:\Users\niwi\Desktop\Repos\Personal\Atlas\node_modules\@apollo\client\utilities\observables\asyncMap.js:17:53)
at C:\Users\niwi\Desktop\Repos\Personal\Atlas\node_modules\@apollo\client\utilities\observables\asyncMap.js:10:72
at new Promise ()
at Object.then (C:\Users\niwi\Desktop\Repos\Personal\Atlas\node_modules\@apollo\client\utilities\observables\asyncMap.js:10:24)
at Object.error (C:\Users\niwi\Desktop\Repos\Personal\Atlas\node_modules\@apollo\client\utilities\observables\asyncMap.js:18:49)
at notifySubscription (C:\Users\niwi\Desktop\Repos\Personal\Atlas\node_modules\zen-observable\lib\Observable.js:140:18)
at onNotify (C:\Users\niwi\Desktop\Repos\Personal\Atlas\node_modules\zen-observable\lib\Observable.js:179:3)
at SubscriptionObserver.error (C:\Users\niwi\Desktop\Repos\Personal\Atlas\node_modules\zen-observable\lib\Observable.js:240:7)
@bgondy
Copy link

bgondy commented Feb 14, 2024

Just faced the same issue but occurs only in server-side for me. Any update on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants