Skip to content

Use graph client with docker network based graph node #132

Closed
@rhlsthrm

Description

@rhlsthrm

We are using a graph node as part of a fully-local setup:

https://github.com/connext/nxtp/blob/a0eb052ac0abb8b83821005f1c44dd8d2448a1fb/docker-compose.chains.yaml#L21

I want to be able to generate a graph client that can be used on resources within this docker network that talk to the graph node. The config for this would look like this:

https://github.com/connext/nxtp/blob/e0519f79172025770047e3aed5c7fa5796f6d56c/packages/adapters/subgraph/.graphclientrc.yml#L140

However I am not able to easily generate the client for this. When I try, it fails because the host cannot access this endpoint. If I use localhost, the container cannot access the graph node because it's not on localhost from the container's point of view. The workaround I used is to spin up a temporary container within the network that can do this. However this is not a feasible option for our devs to use.

Is there another way to generate the schema from a different URL but have the client use the provided URL for the queries?

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