How to infer $variables from ConcreteRequest?

33 views Asked by At

Relay generated files from default node export of type ConcreteRequest.

There is also a separate type export $variables:

export type IndependentPaidProjectPageQuery$variables = {
  id: string;
};

However, it seems that ConcreteRequest has all the necessary data to infer $variables:

> JSON.stringify(node.operation.argumentDefinitions)
< '[{"defaultValue":null,"kind":"LocalArgument","name":"id"}]'

Is there a way to infer $variables just from ConcreteRequest using [type:typescript]?

0

There are 0 answers