Open brandon-leapyear opened 2 years ago
mkGetter' "Node" "getNodes" ".nodes[]"
should work for any object with a nodes key.
nodes
Could be implemented with a helper that generates the type of the input of
[get| .foo[].bar |]
e.g.
getFoo :: [has| .foo[].bar |] ->
Specifically,
getFoo :: [has| .s |] -> [unwrap| MySchema.s |] getFoo = [get| .s |]
should be valid for any schema MySchema and any query path s
MySchema
s
Currently workaround-able with
getFoo :: ( s1 ~ LookupSchema "a" schema , Maybe (Object r1) ~ SchemaResult s1 , s2 ~ LookupSchema "b" r1 , [Object r2] ~ SchemaResult s2 , s3 ~ LookupSchema "c" r2 , Int ~ SchemaResult s3 , Typeable s1 , Typeable s2 , Typeable s3 , Typeable r1 , Typeable r2 ) => Object schema -> [Int] getFoo = [get| .a!.b[].c |]
Possibly related to #2
should work for any object with a
nodes
key.Could be implemented with a helper that generates the type of the input of
e.g.
Specifically,
should be valid for any schema
MySchema
and any query paths
Currently workaround-able with
Possibly related to #2