Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Rejoiner - Relay support thoughts #102

Description

@DianaSuvorova

I have tried to spin up a relay client with rejoiner-based GraphQL server on the back end and here are my observations:

  1. relay client requires graphql.schema to be available locally. So GrapQL server needs to expose a way to get a schema. This is as simple as using schema printer and exposing it via /schema endpoint.
    My need to update an example to demo complete integration.
    private static final String schema = new SchemaPrinter().print(SCHEMA);

  2. I feel a bit uneasy about the fact that ID fields annotations belong to actual source .proto files.
    I actually have not tested it and not sure if it works properly given that Relay support is experimental.
    It could use some more centralized config. For example assume all fields with name id are actually an GraphQL ID type and provide a way to turn it off and/or provide a different name for an ID field. For example new SchemaProviderModule(uid). Since there is a way to update the types on case-by-case basis, I feel this might have a better separation of concerns than to actually bake relay-related artifacts into .proto files.

  3. Similarly I feel that relay support is awesome in general, but should be optional. Maybe it can be an an option to the SchemaProviderModule(relay: true).

  4. I haven't tested @RelayNode signature, but I like the idea.

  5. I haven't checked if mutations and connections work as per spec but planning to get to it soon.

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