Skip to content

Question about schema description #32

@simbo1905

Description

@simbo1905

Given:

Slf4j
@Controller
public class Router {
  private final Lilo lilo;

  public Router() {
    this.lilo = Lilo.builder()
        .addSource(RemoteSchemaSource.create("server1", "http://localhost:8081/graphql"))
        .addSource(RemoteSchemaSource.create("server2", "http://localhost:8082/graphql"))
        .build();
    log.info("Router created");
  }

  @ResponseBody
  @PostMapping("/graphql")
  public Map<String,Object> stitchedSchema(@RequestBody GraphQLRequest input){
    log.info("Router.stitchedSchema() called");
    return this.lilo.stitch(input.toExecutionInput()).toSpecification();
  }
}

When I query with:

{
  __typename
  __schema {
    description
  }
}

Then I get back:

{
  "data": {
    "__typename": "Query",
    "__schema": {
      "description": null
    }
  }
}

How do I set the __schema.description so that I can add some information visible to clients about the scope/nature/sources of the stitched schema which will be very helpful when adding lots of sources across different environments/profiles?

Metadata

Metadata

Assignees

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