Closed timsuchanek closed 7 years ago
In order to support the new docker runtime with graphcool-lib, we need to add endpoint information to the context.
graphcool-lib
I propose adjusting the GraphcoolContext type to add the endpoint object containing system, simple, relay, subscriptions:
GraphcoolContext
endpoint
system
simple
relay
subscriptions
export interface GraphcoolContext { token: string serviceId: string alias: string // new endpoints: endpoints: { system: string simple: string relay: string subscriptions: string } }
As soon as we have the new URL scheme specced out, we should revisit this.
All endpoints in one subobject
Exact values for the shared cluster:
https://api.graph.cool/system
https://api.graph.cool/simple/v1/cj8sxy1hu009i0103j0vujxhn
https://api.graph.cool/relay/v1/cj8sxy1hu009i0103j0vujxhn
wss://subscriptions.graph.cool/v1/cj8t01lxf04ke0141a2fr124z
Exact values for the local cluster:
http://localhost:60000/system
http://localhost:60000/simple/v1/cj8sxy1hu009i0103j0vujxhn
http://localhost:60000/relay/v1/cj8sxy1hu009i0103j0vujxhn
ws://http://localhost:60000/subscriptions/v1/cj8t01lxf04ke0141a2fr124z
also see https://github.com/graphcool/graphcool/issues/827
I'd propose to wrap the endpoints into a subobject called endpoints.
endpoints
Implemented in 0.1.0
0.1.0
In order to support the new docker runtime with
graphcool-lib
, we need to add endpoint information to the context.I propose adjusting the
GraphcoolContext
type to add theendpoint
object containingsystem
,simple
,relay
,subscriptions
:As soon as we have the new URL scheme specced out, we should revisit this.
Update:
All endpoints in one subobject
Update 2:
Exact values for the shared cluster:
system
:https://api.graph.cool/system
simple
:https://api.graph.cool/simple/v1/cj8sxy1hu009i0103j0vujxhn
relay
:https://api.graph.cool/relay/v1/cj8sxy1hu009i0103j0vujxhn
subscriptions
:wss://subscriptions.graph.cool/v1/cj8t01lxf04ke0141a2fr124z
Exact values for the local cluster:
system
:http://localhost:60000/system
simple
:http://localhost:60000/simple/v1/cj8sxy1hu009i0103j0vujxhn
relay
:http://localhost:60000/relay/v1/cj8sxy1hu009i0103j0vujxhn
subscriptions
:ws://http://localhost:60000/subscriptions/v1/cj8t01lxf04ke0141a2fr124z