Handling of instances
- Dominant language
- Python
- Stars
- 17
- Forks
- 10
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 2
Description
## Current solution
Currently, valid instances are specified like this:
```graphql
type Seat {
instanceTag: InCabinArea2x2
}
```
And the `InCabinArea2x2 ` must be declared as:
```gql
type InCabinArea2x2 @instanceTag {
row: ...
column: ...
}
```
Ruleset:
- field name must be `instanceTag`
- output type of this field must be an object type declared as a valid instance with the `@instanceTag` directive.
## Alternative
### with `@instanceTag`
To have an arbitrary name for the tag field but use the directive with both the object and the field.
```graphql
type Seat {
anyFieldName: InCabinArea2x2 @instanceTag
}
```
And the `InCabinArea2x2 ` must be declared as:
```gql
type InCabinArea2x2 @instanceTag {
row: ...
column: ...
}
```
Ruleset:
- there can be only one field for the instance tag using the @instanceTag.
- the field for the instance tag can have an arbitrary name.
- output type of this field must be an object type declared as a valid instance with the `@instanceTag` directive.
### with two directives @instanceTagField and @instanceTagObject instead:
```graphql
type Seat {
anyFieldName: InCabinArea2x2 @instanceTagField
}
```
And the `InCabinArea2x2 ` must be declared as:
```gql
type InCabinArea2x2 @instanceTagObject {
row: ...
column: ...
}
```
Contributor guide
Assessment
This issue has not been assessed yet.