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

API EN LOCALHOST FUNCIONA BIEN PERO CUANDO LO SUBO A VERCEL ME DA ERROR DE SERVIDOR NO ME MUESTRA LOS DATOS DE MI BASE DE DATOS #290

Open
ManuelTeranCampi opened this issue Dec 21, 2022 · 0 comments

Comments

@ManuelTeranCampi
Copy link

https://paneldeusuario.vercel.app/api/graphql CUANDO LO SUBO A VERCEL ME DA ESTE ERROR EN MI API

Captura de pantalla (542)

http://localhost:3000/api/graphql EN LOCALHOST FUNCIONA BIEN

Captura de pantalla (545)

https://paneldeusuario.vercel.app/admin/models/User ME DA ERROR DE SERVIDOR NO ME MUESTRA LOS DATOS SERVER STATUS OF 400 ERROR DE API
Captura de pantalla (546)

ESTE ES MI API/GRAPHQL
import { ApolloServer } from '@apollo/server';
import { startServerAndCreateNextHandler } from '@as-integrations/next';
import { schema } from '../../server/nexusSchema';
import { createContext } from '../../server/context';
import { NextApiRequest, NextApiResponse } from 'next';
import { ApolloServerPluginLandingPageDisabled } from '@apollo/server/plugin/disabled';
import { ApolloServerPluginLandingPageGraphQLPlayground } from '@apollo/server-plugin-landing-page-graphql-playground';

type NextApi = {
req: NextApiRequest;
res: NextApiResponse;
};

const apolloServer = new ApolloServer({
schema,
plugins: [
process.env.NODE_ENV === 'production'
? ApolloServerPluginLandingPageDisabled()
: ApolloServerPluginLandingPageGraphQLPlayground(),
],
});

export default startServerAndCreateNextHandler(apolloServer, {
context: createContext,
});

@ManuelTeranCampi ManuelTeranCampi changed the title EN LOCALHOST FUNCIONA BIEN PERO CUANDO LO SUBO A VERCEL ME DA ERROR DE SERVIDOR NO ME MUESTRA LOS DATOS DE MI BASE DE DATOS API EN LOCALHOST FUNCIONA BIEN PERO CUANDO LO SUBO A VERCEL ME DA ERROR DE SERVIDOR NO ME MUESTRA LOS DATOS DE MI BASE DE DATOS Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant