Skip to content

Instantly share code, notes, and snippets.

@sibelius
Forked from janicduplessis/AdminDashboardQuery.ts
Created August 17, 2019 18:56
Show Gist options
  • Select an option

  • Save sibelius/4c3ecff0dbc8fc475dd6843abdec5690 to your computer and use it in GitHub Desktop.

Select an option

Save sibelius/4c3ecff0dbc8fc475dd6843abdec5690 to your computer and use it in GitHub Desktop.

Revisions

  1. @janicduplessis janicduplessis created this gist Aug 17, 2019.
    32 changes: 32 additions & 0 deletions schema.graphql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    type XYChartData {
    x: Float!
    y: Float!
    label: String
    }

    type BarChart {
    title: String
    data: [XYChartData!]!
    }

    union Chart = BarChart

    """An edge in a connection."""
    type ChartEdge {
    """The item at the end of the edge"""
    node: Chart!

    """A cursor for use in pagination"""
    cursor: String!
    }

    """A connection to a list of items."""
    type ChartConnection {
    """Information to aid in pagination."""
    pageInfo: PageInfo2!

    """A list of edges."""
    edges: [ChartEdge!]!
    }

    adminDashboard(from: Date!, to: Date): ChartConnection!