Skip to content

Pr/62/merge #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public void queryForEntityWithMappedSuperclass() {

// https://github.com/introproventures/graphql-jpa-query/issues/30
@Test
public void queryForEntityWithEmeddableType() {
public void queryForEntityWithEmbeddedIdAndEmbeddedField() {
//given
String query = "{ Boat(boatId: {id: \"1\" country: \"EN\"}) { boatId {id country} engine { identification } } }";

Expand All @@ -376,7 +376,7 @@ public void queryForEntityWithEmeddableType() {
}

@Test
public void queryForEntityWithEmeddableTypeAndWhere() {
public void queryForEntityWithEmbeddedFieldWithWhere() {
//given
String query = "{ Boats { select { boatId {id country} engine(where: { identification: { EQ: \"12345\"}}) { identification } } } }";

Expand All @@ -390,9 +390,9 @@ public void queryForEntityWithEmeddableTypeAndWhere() {
}

@Test
public void queryForEntitiesWithEmeddableTypeAndWhereEmbeddableId() {
public void queryForEntitiesWithWithEmbeddedIdWithWhere() {
//given
String query = "{ Boats(where: {boatId: {EQ: {id: \"1\" country: \"EN\"}}}) { select { boatId {id country} engine { identification } } } }";
String query = "{ Boats { select { boatId(where: { id: { LIKE: \"1\"} country: { EQ: \"EN\"}}) {id country} engine { identification } } } }";

String expected = "{Boats={select=[{boatId={id=1, country=EN}, engine={identification=12345}}]}}";

Expand All @@ -402,5 +402,5 @@ public void queryForEntitiesWithEmeddableTypeAndWhereEmbeddableId() {
// then
assertThat(result.toString()).isEqualTo(expected);
}

}