export interface graphqlVariable {
  name: string
  // `true` for `[T]`, `[true]` for `[T!]` — matches gql-query-builder's
  // VariableOptions shape so element non-null survives into the query string.
  list?: boolean | [boolean]
  required?: boolean
  type?: string
  value?: any
}
export interface graphqlOperationObject<T, U> {
  variables?: graphqlVariable[]
  fields?: graphqlTypeObject
  operationType: 'Query' | 'Mutation'
  name: string
  call: (fields?: Array<string | Object>, variables?: U, cache?: boolean | number) => Promise<T>
}

export interface graphqlTypeObject {
  fields: string[]
  relations: graphqlVariable[]
}

export interface graphqlInputObject {
  variables: graphqlVariable[]
}
