databaseflow icon indicating copy to clipboard operation
databaseflow copied to clipboard

[Feature] Reversed Foreign Key Field.

Open xialvjun opened this issue 6 years ago • 0 comments

current status:

type Author {
  id: ID!
  name: String!
}

type Book {
  id: ID!
  title: String!
  author_id: ID!
  author: Author!
}

request feature:

type Author {
  id: ID!
  name: String!
  # add this field: search books by author rather than search author by book
  # name the argument as 'otherWhereClause' because there has been a whereClause: book.author_id=author.id
  books(sortCol: String, sortAsc: Boolean, otherWhereClause: String, ....): [Book!]!
}

type Book {
  id: ID!
  title: String!
  author_id: ID!
  author: Author!
}

xialvjun avatar Apr 08 '18 09:04 xialvjun