Skip to content
This repository has been 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

Open
darahayes opened this issue Sep 5, 2018 · 1 comment

Comments

@darahayes
Copy link
Contributor

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.

@psturc
Copy link
Contributor

psturc commented Sep 19, 2018

I just hit the same issue.
The origin of this issue is the same, but the scenario was a little bit different.

Steps: Delete the resolver which contains a subscription (it was selected from the dropdown), then remove it from the schema and restart server pod.

So apparently there's also a bug in the UI, because if you delete resolver containing subscription, UI should take care of removing resolver and subscription. But this doesn't happen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants