-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Overview
Currently, when an array-like field is getting created, it is necessary to pass an additional argument to the creation process:
const people = new Query('people', true)
.addField('friends', true)
.addField(new Field('parents', true)
.addField('gender')
.addField('age')
);
const result = await client.post(people);
result[0].friends[0];
result[0].parents[0].gender;
result[0].parents[0].age;Expected behavior
In the ideal world, this is handled completely automatically.
Brief mockup:
- Use GraphQL type introspection functionality to generate the schema of TS types locally.
- When building the type - either during the field generation process or query fetching, use the generated schema to determine whether the field is an array or not.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels