Skip to content

query language for database's executable definitions #411

Open
@lrlna

Description

@lrlna

Would kind of be interesting to explore querying executable definition types with a smaller query language that we can use in the database.

Given a schema:

  interface Pet {
    name: String
  }

  type Dog implements Pet {
    name: String
    nickname: String
    barkVolume: Int
  }

  type Cat implements Pet {
    name: String
    nickname: String
    meowVolume: Int
  }

  union CatOrDog = Cat | Dog

  type Human {
    name: String
    pets: [Pet]
  }

  type Query {
    human: Human
  }

and a query like this:

{
  human {
    pets {
      name
    }
  }
}

it would be interesting to be able to do something like this compiler.db.query.find("human.pets.name").

Metadata

Metadata

Assignees

No one assigned

    Labels

    apollo-compilerissues/PRs pertaining to semantic analysis & validationtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions