Skip to content

Add @count to GraphQL schemas and queries #5529

@ScottWallace

Description

@ScottWallace

Experience Report

We are using a hybrid of a GraphQL schema, mutations in GraphQL, and queries in GraphQL+. This allows us to use @count in queries, but still use the ease of GraphQL mutations and schema creation. We use the dashboard to recreate count indexes after schema updates.

What you wanted to do

We would like to use the @count directive in our GraphQL schemas, and have it create count indexes. Counts are integral to our effort, not just for display to the user, but also in queries that include var math to create weighted values for sorting. As a second priority, we would like to have count supported in GraphQL queries, but the index creation is most important to us.

What you actually did

We've considered taking the effort to create standard (non-GraphQL) schemas, but want to know if @count is on the list of enhancements and when it might arrive, rather than change out our schema and all the testing associated with it.

Why that wasn't great, with examples

We re-create count indexes after each schema change. A trivial task, but could be risky once we enter a live environment. We use GraphQL+ in queries in order to pick up the count feature, but would enjoy staying with just GraphQL for all data access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/graphqlIssues related to GraphQL support on Dgraph.kind/featureSomething completely new we should consider.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions