File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,32 +8,32 @@ chapter: Get A Listing Query
88postnumber : 13
99---
1010
11- In this chapter we will attempt to get a single a listing from Dynamo when given a listingID.
11+ In this chapter we will attempt to get a single a listing from Dynamo when given a ` listingID ` .
1212
1313To do this let's edit our schema and add the following query:
1414
15- ```
15+ ``` json
1616 getAListing(listingId: String!): Listing!
1717```
1818
1919Your Query Type should now look like this:
2020
21- ```
21+ ``` json
2222 type Query {
2323 getAllListings: [Listing]
2424 getAListing(listingId: String!): Listing!
2525 }
2626```
2727
28- Next lets go ahead and export our getAListing query. Go into the query.js file and add the following:
28+ Next lets go ahead and export our ` getAListing ` query. Go into the ` query.js ` file and add the following:
2929
3030``` javascript
3131export const getAListing = async (args , context ) => {
3232 return null
3333}
3434```
3535
36- Then finally import it into the index for the resolvers:
36+ Then finally import it into the ` index ` of the resolvers:
3737
3838``` javascript
3939import { getAllListings , getAListing } from " ./query"
You can’t perform that action at this time.
0 commit comments