Skip to content

Commit

Permalink
add another id name test
Browse files Browse the repository at this point in the history
  • Loading branch information
do4gr committed Jul 19, 2019
1 parent 3d43a16 commit 40112cf
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,33 @@ class DeployingCustomIdNamesSpec extends FlatSpec with Matchers with Integration

deployServer.deploySchemaThatMustSucceed(project, schema1, 3, true)
}

"Using [typename]id as a field for relations" should "work" in {

val schema =
"""type Person {
| id: ID! @id
| age: Int! @unique
|}"""

val (project, _) = setupProject(schema)

val schema1 =
"""type Contact @db(name: "contact") {
|id: Int! @id
|info: String!
|type: String!
|customerid: Customer
|}
|
|type Customer @db(name: "customer") {
|id: Int! @id
|contact: [Contact]
|firstname: String!
|lastname: String!
|}"""

deployServer.deploySchemaThatMustSucceed(project, schema1, 3, true)
}

}

0 comments on commit 40112cf

Please sign in to comment.