type Actor {
  name: String
  age: Int
  externalId: ID!
}

type ActorAggregateConnection {
  edges: [_ActorAggregateEdge]!
  items: [ActorAggregateResult]!
  pageInfo: PageInfo!
}

type ActorAggregateResult {
  group: JSONObject
  avg: _ActorAggregateFieldResult
  min: _ActorAggregateFieldResult
  max: _ActorAggregateFieldResult
  count: _ActorAggregateFieldCountResult
  sum: _ActorAggregateFieldResult
  histogram(interval: Int!): _ActorAggregateHistogramFieldResult
}

type ActorConnection {
  edges: [_ActorEdge]!
  items: [Actor]!
  pageInfo: PageInfo!
}

type DataPoint {
  timestamp: Timestamp
  value: DataPointValue
}

"""
Represents the value of a data point. Can be either a String (<= 255 characters) or a number in the range [-1e100, 1e100]. 
"""
scalar DataPointValue

"""
Represents a 64-bit integer value. Note that some consumers as JavaScript only supports [-(2^53)+1, (2^53)-1].
"""
scalar Int64

"""Represents a plain JSON object."""
scalar JSONObject

type Movie {
  name: String
  actors(first: Int, after: String, filter: _ListActorFilter, sort: [_ActorSort!]): ActorConnection
  watchedIt: Boolean
  externalId: ID!
}

type MovieAggregateConnection {
  edges: [_MovieAggregateEdge]!
  items: [MovieAggregateResult]!
  pageInfo: PageInfo!
}

type MovieAggregateResult {
  group: JSONObject
  avg: _MovieAggregateFieldResult
  min: _MovieAggregateFieldResult
  max: _MovieAggregateFieldResult
  count: _MovieAggregateFieldCountResult
  sum: _MovieAggregateFieldResult
  histogram(interval: Int!): _MovieAggregateHistogramFieldResult
}

type MovieConnection {
  edges: [_MovieEdge]!
  items: [Movie]!
  pageInfo: PageInfo!
}

type Mutation {
  _empty: Boolean!
}

type PageInfo {
  hasPreviousPage: Boolean!
  hasNextPage: Boolean!
  startCursor: String
  endCursor: String
}

type Query {
  listMovie(first: Int, after: String, filter: _ListMovieFilter, sort: [_MovieSort!]): MovieConnection
  searchMovie(query: String!, fields: [_SearchMovieFields!], filter: _SearchMovieFilter, first: Int): MovieConnection
  aggregateMovie(query: String, fields: [_SearchMovieFields!], groupBy: [_SearchMovieFields!], filter: _SearchMovieFilter, after: String): MovieAggregateConnection
  listActor(first: Int, after: String, filter: _ListActorFilter, sort: [_ActorSort!]): ActorConnection
  searchActor(query: String!, fields: [_SearchActorFields!], filter: _SearchActorFilter, first: Int): ActorConnection
  aggregateActor(query: String, fields: [_SearchActorFields!], groupBy: [_SearchActorFields!], filter: _SearchActorFilter, after: String): ActorAggregateConnection
}

enum SortDirection {
  ASC
  DESC
}

type TimeSeries {
  id: Int64
  externalId: String
  name: String
  isString: Boolean
  metadata: JSONObject
  unit: String
  assetId: Int64
  isStep: Boolean
  description: String
  securityCategories: [Int64]
  datasetId: Int64
  dataPoints(start: Int64, end: Int64, limit: Int): [DataPoint]
}

"""
A timestamp with UTC-offset, formatted as a ISO-8601 date time string, with potentially microsecond resolution.Note as input the timestamp can be formatted as a number, which is assumed to represent milliseconds since Unix epoch.
"""
scalar Timestamp

type _ActorAggregateEdge {
  node: ActorAggregateResult!
  cursor: String
}

type _ActorAggregateFieldCountResult {
  externalId: Int
  name: Int
  age: Int
}

type _ActorAggregateFieldResult {
  age: Float
}

type _ActorAggregateHistogramFieldResult {
  age: [_AggregateHistogramObjectType]
}

type _ActorEdge {
  node: Actor!
  cursor: String
}

input _ActorSort {
  externalId: SortDirection
  name: SortDirection
  age: SortDirection
}

type _AggregateHistogramObjectType {
  start: Int
  count: Int
}

input _BooleanCondition {
  eq: Boolean
  isNull: Boolean
  in: [Boolean!]
}

input _FloatCondition {
  eq: Float
  isNull: Boolean
  in: [Float!]
  gt: Float
  lt: Float
  gte: Float
  lte: Float
}

input _IDCondition {
  eq: ID
  isNull: Boolean
  in: [ID!]
}

input _Int64Condition {
  eq: Int64
  isNull: Boolean
  in: [Int64!]
  gt: Int64
  lt: Int64
  gte: Int64
  lte: Int64
}

input _IntCondition {
  eq: Int
  isNull: Boolean
  in: [Int!]
  gt: Int
  lt: Int
  gte: Int
  lte: Int
}

input _ListActorFilter {
  and: [_ListActorFilter!]
  or: [_ListActorFilter!]
  not: _ListActorFilter
  externalId: _IDCondition
  name: _StringCondition
  age: _IntCondition
}

input _ListBooleanFilter {
  containsAll: [Boolean]
  containsAny: [Boolean]
}

input _ListFloatFilter {
  containsAll: [Float]
  containsAny: [Float]
}

input _ListIDFilter {
  containsAll: [ID]
  containsAny: [ID]
}

input _ListInt64Filter {
  containsAll: [Int64]
  containsAny: [Int64]
}

input _ListIntFilter {
  containsAll: [Int]
  containsAny: [Int]
}

input _ListMovieFilter {
  and: [_ListMovieFilter!]
  or: [_ListMovieFilter!]
  not: _ListMovieFilter
  externalId: _IDCondition
  name: _StringCondition
  watchedIt: _BooleanCondition
}

input _ListStringFilter {
  containsAll: [String]
  containsAny: [String]
}

input _ListTimestampFilter {
  containsAll: [Timestamp]
  containsAny: [Timestamp]
}

type _MovieAggregateEdge {
  node: MovieAggregateResult!
  cursor: String
}

type _MovieAggregateFieldCountResult {
  externalId: Int
  name: Int
  watchedIt: Int
}

type _MovieAggregateFieldResult {
  _empty: Int!
}

type _MovieAggregateHistogramFieldResult {
  _empty: [_AggregateHistogramObjectType]
}

type _MovieEdge {
  node: Movie!
  cursor: String
}

input _MovieSort {
  externalId: SortDirection
  name: SortDirection
  watchedIt: SortDirection
}

enum _SearchActorFields {
  name
  age
  externalId
}

input _SearchActorFilter {
  and: [_SearchActorFilter!]
  or: [_SearchActorFilter!]
  not: _SearchActorFilter
  externalId: _IDCondition
  name: _StringCondition
  age: _IntCondition
}

enum _SearchMovieFields {
  name
  watchedIt
  externalId
}

input _SearchMovieFilter {
  and: [_SearchMovieFilter!]
  or: [_SearchMovieFilter!]
  not: _SearchMovieFilter
  externalId: _IDCondition
  name: _StringCondition
  watchedIt: _BooleanCondition
}

input _StringCondition {
  eq: String
  isNull: Boolean
  in: [String!]
  gt: String
  lt: String
  gte: String
  lte: String
  prefix: String
}

input _TimestampCondition {
  eq: Timestamp
  isNull: Boolean
  in: [Timestamp!]
  gt: Timestamp
  lt: Timestamp
  gte: Timestamp
  lte: Timestamp
}