eiffel-community / eiffel-community/eiffel-graphql-api

Use actual Event property names in ObjectType

Open
#60 0 comments 0 reactions 1 assignee Claimed by @sselberg View on GitHub
Dominant language
Python
Stars
4
Forks
6
PR merge metrics
No merged PRs in 30d

Description

### Description
Many data object properties are prefixed with the object name which makes the graphql queries less than self explanatory.

### Motivation
This makes it unnecessarily complicated for a client that expects a valid SourceChangeCreatedEvent as response.

### Exemplification
For instance the following query were you request a SourceChangeCreatedEvent with a specific value for data.gitIdentifier.commitId but in the repsonse object data.gitIdentifier is renamed to data.sourceChangeCreatedGitIdentifier
```
{
sourceChangeCreated(search: "{ 'data.gitIdentifier.commitId':'ae64999f160ddfec29eaa2da77f6fc82b785ac20' }") {
edges {
node {
data {
sourceChangeCreatedGitIdentifier {
commitId
}
}
}
}
}
}
```
Response:
```
{
"data": {
"sourceChangeCreated": {
"edges": [
{
"node": {
"data": {
"sourceChangeCreatedGitIdentifier": {
"commitId": "ae64999f160ddfec29eaa2da77f6fc82b785ac20"
}
}
}
}
]
}
}
}
```

### Benefits
Simplicity, Consistency

### Possible Drawbacks
There might possibly be queries "in the wild" that have already adjusted to this API.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.