Skip to content

Commit fe75e1a

Browse files
committed
change names to look better
Signed-off-by: asararatnakar <[email protected]>
1 parent 12ed847 commit fe75e1a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

transforms/setters/api.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type Query {
1818
# ecmascript generates customer data to simulate a REST api with a JSON response.
1919
# To verify with a real data source (API or a database) it is required to change the `endpoint` argument on the `@rest` directive.
2020
# https://stepzen.com/docs/connecting-backends/how-to-connect-a-rest-service
21-
customerByID(id: ID!): Customer
21+
customer(id: ID!): Customer
2222
@rest(
2323
endpoint: "stepzen:empty"
2424
ecmascript: """

transforms/setters/requests.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# maps some of JSON response values to the fields of the GraphQL result.
22
query CustomerByID($id: ID!) {
3-
customerByID(id: $id) {
3+
customer(id: $id) {
44
address {
55
city
66
state

transforms/setters/tests/Test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe(testDescription, function () {
1919
operationName: "CustomerByID",
2020
variables: { id: 1 },
2121
expected: {
22-
customerByID: {
22+
customer: {
2323
address: {
2424
city: "Raleigh",
2525
country: "USA",
@@ -36,7 +36,7 @@ describe(testDescription, function () {
3636
operationName: "CustomerByID",
3737
variables: { id: 100 },
3838
expected: {
39-
customerByID: {
39+
customer: {
4040
address: {
4141
city: "Hyderabad",
4242
country: "India",

0 commit comments

Comments
 (0)