Skip to content

GraphQL: Compact network format  #42

@lcdr

Description

@lcdr

Currently GraphQL uses JSON as the network format. This works, but is inefficient, as each entry repeats its field names. Since the GraphQL client specifies the response structure, it already knows the field names. As long as there are no optional fields, this means we can transfer data in a much more compact manner by skipping field name serialization entirely and reconstructing them on the client.

In addition, in the case of arrays, we wouldn't need to send opening and closing braces and commas for each entry, since with a constant number of fields known in advance we can section the array on the client.

If we ever start supporting conditional fields we could still serialize those as standard JSON, resulting in a hybrid format that is both flexible and compact.

This would help reducing network overhead to something comparable to the SQL API's CSV format.

Metadata

Metadata

Assignees

No one assigned

    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