Skip to content

Commit f38535a

Browse files
committed
done mutation schema post
1 parent 58de585 commit f38535a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/content/creating-the-mutation-in-the-schema.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ Open up your `schema.js` file and paste the following:
4444

4545
```
4646

47-
🌍 Our first type is a Booking Type, with the data we need to capture the booking of the specific listing. If you note there is a Customers field.
47+
🌍 Our first type is a `Booking` Type, with the data we need to capture the booking of the specific listing. If you note there is a `Customers` field.
4848

49-
🌍 This Customers field is meant to return an array of customers, which we have defined as its own type.
49+
🌍 This `Customers` field is meant to return an array of customers, which we have defined as its own type.
5050

51-
🌍 lastly, we have an input called InputCustomer. An input in GraphQL is a Type that is used for mutations to pass in large objects. This will make it easier to call our mutation.
51+
🌍 lastly, we have an input called `InputCustomer`. An input in GraphQL is a Type that is used for mutations to pass in large objects. This will make it easier to call our mutation.
5252

5353
Next up lets create a mutation type in our schema:
5454

55-
```
55+
```javascript
5656
type Mutation {
5757
makeABooking(
5858
listingId: String
@@ -66,6 +66,6 @@ Next up lets create a mutation type in our schema:
6666

6767
```
6868

69-
🌍 We are saying that our makeABooking mutation should take a listingId,size, bookingDate and customerEmail arguments. Then customers is also an argument but we are assigning it as an array of the InputCustomer. This means we can add multiple entires of the customer to our mutation.
69+
🌍 We are saying that our `makeABooking`mutation should take a `listingId`,`size`, `bookingDate` and `customerEmail` arguments. Then `customers` is also an argument but we are assigning it as an array of the `InputCustomer`. This means we can add multiple entires of the customer to our mutation.
7070

7171
The beauty of GraphQL is that it comes with nifty features that REST does not. Best of all any other developers will be able to know how to call this Mutation easily by looking at it in the schema pane in Playground.

0 commit comments

Comments
 (0)