-
Notifications
You must be signed in to change notification settings - Fork 17
Related Entities Not included #9
Comments
Okay, I have figured it out. Simple solution: call the gateway, as opposed to the entity services: |
By the way, I realized that the latest |
@go4cas thanks for the heads up about npm.. I was going crazy wondering why the gateway.graphql call wasn't working. Would be great if an updated release could be made to npm @brad-decker . This module is awesome! |
@go4cas and @albert-the-creator -- sorry about that guys will get an updated release out soon. And just to reiterate, the individual graphql actions created on each schema service are intended to be used only by the gateway. The gateway is the only entity on the network that has the "Full view" of the schemas and how they work together. |
@brad-decker, thanks for looking into the release. Yes, I fully agree that the gateway should be the only entry point into the schema of the underlying services. It wasn't that clear in the docs, but after a while I figured it out, and things just started working. Really easy, and very powerfull! |
@brad-decker, any update on the NPM release? Thanks! |
@brad-decker would love to hear about an updated release too. Reads like the current npm version doesn't work as intended (gateway as only entry point)without publishing the fixes. |
I have the following models:
Author
Book
Used by the following services:
author.service
book.service
The
GraphQLGateway
is started in the API Gateway:The gateway starts up correctly. When calling one of the services, this works fine:
call author.graphql --query "{authors {name id}}"
But, when including a related entity:
call author.graphql --query "{authors {name id books{title year authorId id}}}"
, the following exception:Cannot query field "books" on type "Author"
The text was updated successfully, but these errors were encountered: