graphQL endpoint unreachable when using `files: '/*'`

Open Beginner friendly
#36 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
graphql, nextjs, typescript
Domain
api, backend

Research direction

Start at extension.js around line 374 and inspect the server.http handler's interaction with Next.js requestHandler. Reproduce the request with the curl example and trace how an unowned /graphql route is handled. Done means the endpoint returns a GraphQL response instead of Next.js' 404 page.

Written by the indexing model from the issue text.

Description

Getting this error:

lavinia@Lavinias-MacBook-Pro harper-ecommerce-template % curl -sk -X POST "https://us-ord-1.v5-testing.akamai.stage.harperfabric.com:9926/graphql" \
  -H "Content-Type: application/json" \
  -u "lavinia@harperdb.io:Stephenhawking96.," \
  -d '{"query":"{ Product { id name category price } }"}'
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/cfddc0e2b913ca42.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_ne .....

The /graphql endpoint returns a nextjs 404 page instead of a graphQL response.

Here the server.http handler passes every request to next,js' requestHandler without falling through to harper for routes next.js doesn't own.

Dominant language
TypeScript
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HarperFast/nextjs

All issues in HarperFast/nextjs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.