Skip to content

"API resolved without sending a response" false report #11262

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

Closed
ziimakc opened this issue Mar 21, 2020 · 3 comments
Closed

"API resolved without sending a response" false report #11262

ziimakc opened this issue Mar 21, 2020 · 3 comments
Labels
good first issue Easy to fix issues, good for newcomers

Comments

@ziimakc
Copy link

ziimakc commented Mar 21, 2020

Bug report

Describe the bug

Api endpoint

Next will log the "API resolved without sending a response" warning even though the API endpoint always send a response back.

To Reproduce

Full code.

import { ApolloServer } from "apollo-server-micro";
import { schema } from "../../apollo/schema";

const apolloServer = new ApolloServer({ schema });

export const config = {
  api: {
    bodyParser: false
  }
};

const prehandler = async (req, res) => true;

const apolloHandler = apolloServer.createHandler({ path: "/api/graphql" });

const apiHandler = async (req, res) => {
  const isOk = await prehandler(req, res);

  if (!isOk) return;

  apolloHandler(req, res);
};

export default apiHandler;

Expected behavior

No warning

System information

OS: Windows 10
Version of Next.js: v9.3.2

@timneutkens timneutkens added good first issue Easy to fix issues, good for newcomers help wanted labels Mar 23, 2020
@jazibjafri
Copy link
Contributor

Check this comment
Duplicate of this, this, and this

@ziimakc
Copy link
Author

ziimakc commented Mar 25, 2020

@jazibjafri thanks, i think this fiture harming more then helping.

@ziimakc ziimakc closed this as completed Mar 25, 2020
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants