-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Global server at /api #13852
Comments
|
Not sure if this is a bug or a feature, but you should be able to work around it with serverMiddleware: {
{ path: '/api', handler: '~/server/graphql.ts' }
} |
This seems to work fine for me with |
Thanks for the update. I can confirm that with a file at |
Let's follow that request in #14892. |
Environment
Linux
v16.13.0
3.0.0-rc.1
yarn@1.22.17
vite
target
,bridge
,vite
,alias
,nitro
,ssr
,meta
,css
,tailwindcss
,modules
,watch
,runtimeConfig
,build
,storybook
@nuxtjs/tailwindcss@5.0.2
,@pinia/nuxt@0.1.8
-
Reproduction
JabRef/JabRefOnline#1009
Describe the bug
Not sure if this is a bug report or a feature request.
For graphql servers, it's quite common to only expose a single server route. However, I was not able to expose the server at
/api
. I tried adding a/server/api/index.ts
file, but then the server would be available at/api/index
. With/server/api/[...].ts
one has to use/api/
with slash.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: