Skip to content
This repository was archived by the owner on May 31, 2019. It is now read-only.
This repository was archived by the owner on May 31, 2019. It is now read-only.

Server does not start properly when a resolver is stored in database but not defined in schema #89

@darahayes

Description

@darahayes

Description

The server doesn't start when there is a resolver in the metadata db, but there is no matching Query/Mutation/Subscription in the schema. Example logs:


{"level":30,"time":1536137450457,"msg":"Using default schemaListener since SCHEMA_LISTENER_CONFIG environment variable is not defined","pid":19,"hostname":"data-sync-server-13-7gtkt","v":1}
--
  | {"level":50,"time":1536137451418,"msg":"Error while building schema.","pid":19,"hostname":"data-sync-server-13-7gtkt","v":1}
  | {"level":50,"time":1536137451418,"msg":"\"Subscription\" defined in resolvers, but not in schema","pid":19,"hostname":"data-sync-server-13-7gtkt","type":"Error","stack":"Error: \"Subscription\" defined in resolvers, but not in schema","v":1}
  | {"level":50,"time":1536137451419,"msg":"[object Promise]","pid":19,"hostname":"data-sync-server-13-7gtkt","type":"Error","stack":"Error: \"Subscription\" defined in resolvers, but not in schema","v":1}

Steps to reproduce

In the data-sync-ui, define a schema with some query/mutation/subscription. Add a matching resolver. Now comment out the query/mutation/subscription in the UI and restart the server. It does not initialize properly.

I would take a guess and say that an error would occur during schema reload also.

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