mondrian-rest icon indicating copy to clipboard operation
mondrian-rest copied to clipboard

[Feature] GraphQL endpoint

Open jazzido opened this issue 7 years ago • 1 comments

GraphQL seems like a natural candidate to express aggregations to mondrian-rest.

jazzido avatar Mar 20 '17 23:03 jazzido

[Jotting down a possible sample of a query]

From mondrian-rest-demo:

/cubes/Trade Flow/aggregate.csv?drilldown[]=Year&measures[]=Exports&cut[]=Origin Country.South America&cut[]=Destination%20Country.Europe.Germany&cut[]=Product.Live%20Animals

  • drilldowns:
    • Year
  • cuts:
    • Origin Country.South America
    • Destination Country.Europe.Germany
    • Product.Live Animals
  • measures:
    • Exports

Can be expressed as follows:

tradeFlow {
  measures {
    Exports
  }

  drilldowns {
    Year
  }

  cuts {
    Origin_Country {
      South America
    }
    Destination_Country {
      Europe {
        Germany
      }
    }
    Product {
      Live_Animals
    }
  }
}

This would require types to be generated programmatically by the endpoint, by inspecting the structure of a cube. F# Type Providers are a good source of inspiration for this.

jazzido avatar Apr 04 '17 22:04 jazzido