Skip to content

How to reproduce NOT_FOUND error with context.mirageSchema.findBy() #78

@rgaiacs

Description

@rgaiacs

Hi,

I have a custom resolver (like https://github.com/miragejs/graphql?tab=readme-ov-file#example-deleting-a-person). For a minimal example, consider that the database table person is empty and the result of

const person = context.mirageSchema.db.people.find(1)

is person be null. How do I create a NOT_FOUND error? Currently, Mirage JS GraphQL will return null but no error.

I would appreciate any help to reproduce the follow query to GitHub GraphQL API

Screenshot 2024-04-17 at 16-14-56 Explorer - GitHub Docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions