gintonic icon indicating copy to clipboard operation
gintonic copied to clipboard

Allow duplication and type annotation

Open budde377 opened this issue 6 years ago • 0 comments

We currently allow locking arguments and fields on input values. But we should consider locking fields on an input value in specific contexts. E.g. something like:

transform input I as AI {
  arg = "foobar"
}

...
  field(arg1: AI, arg2: I)

Here we create a new input object, AI, from I, and uses both object types. This is not currently supported and would require that we check that the input types are compatible. Either by AI being derived from I or they being equal. This could also be used for output objects.

Notice that the syntax is different from type aliasing. Maybe it doesn't have to be.

budde377 avatar Dec 14 '18 18:12 budde377