Skip to content

Bailout on undeclared types #334

@tusharmath

Description

@tusharmath

Prerequisites

  • I have checked the existing issues to ensure this is not a duplicate.
  • I am running the latest version of Tailcall.

Describe the bug

At the time of schema validation, whenever there is a type that's not defined in the schema/config, tailcall server should bailout and display and error message with a proper trace.

Steps to reproduce

Use the following graphql config

schema @schema {
  query: Query
}

type Query {
  users: [User] @http(baseURL: "https://jsonplaceholder.typicode.com", path: "/users")
}

Perform a check command

tc check ./assets/jsonplaceholder.graphql
No errors found
N + 1: 0

Expected behavior

  • A validation error should be shown — `Undeclared type 'User' was found [@ Query, users]
  • tc start should not panic

Actual behavior

  • No validation error is thrown
  • Server start panics and fails.

Environment information:

  • All envs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions