Skip to content

Use actual Event property names in ObjectType #60

@sselberg

Description

@sselberg

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions