diff --git a/README.md b/README.md index c5fa512..37fb131 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,16 @@ This route returns a JSON object containing details of a specific GitHub communi ```json { - "query": "query { member(username: \"PRATHAM1ST\") { name github_link profile_pic_url bio } }" + "query": ` + query { + member(username: "PRATHAM1ST") { + name + github_link + profile_pic_url + bio + } + } + ` // member(username: \"$github_username\") } ``` @@ -155,7 +164,16 @@ This route returns a JSON object containing details of a specific GitHub communi ```json { - "query": "query { members { name github_link profile_pic_url bio } }" + "query": ` + query { + members { + name + github_link + profile_pic_url + bio + } + } + ` } ``` @@ -210,7 +228,14 @@ This route returns a JSON object containing details of a specific GitHub communi ```json { - "query": "query { members { name bioData } }" + "query": ` + query { + members { + name + bioData + } + } + ` // Note that bioData is a custom field that is not available in the database. It is a custom field that is created by the resolver. } diff --git a/__tests__/index.test.ts b/__tests__/index.test.ts index b621cef..fc58039 100644 --- a/__tests__/index.test.ts +++ b/__tests__/index.test.ts @@ -103,7 +103,7 @@ describe("POST /graphql - Specific Member", () => { it("should return a specific member by login with name and username", async () => { const query = ` query { - member(login: "PRATHAM1ST") { + member(username: "PRATHAM1ST") { name username } @@ -127,7 +127,7 @@ describe("POST /graphql - Specific Member", () => { it("should return null for non-existent member", async () => { const query = ` query { - member(login: "NonExistentUser") { + member(username: "NonExistentUser") { name username }