Skip to content

Commit

Permalink
add: graphql typedef
Browse files Browse the repository at this point in the history
  • Loading branch information
genzyy committed Nov 8, 2023
1 parent af3525c commit f5ab771
Show file tree
Hide file tree
Showing 3 changed files with 423 additions and 6 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"build": "rimraf build && tsc -p tsconfig.json"
},
"dependencies": {
"@apollo/server": "^4.9.5",
"@prisma/client": "^5.3.1",
"@types/bcryptjs": "^2.4.4",
"@types/nodemailer": "^6.4.11",
Expand All @@ -29,6 +30,8 @@
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-rate-limit": "^7.0.2",
"graphql": "^16.8.1",
"graphql-tag": "^2.12.6",
"helmet": "^7.0.0",
"http-status": "^1.7.0",
"joi": "^17.10.2",
Expand Down
25 changes: 25 additions & 0 deletions src/typedefs/typeDefs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import gql from 'graphql-tag';

const typeDefs = gql`
input QueryUserRequest {
uuid: String
}
type UserResponse {
uuid: String!
email: String
name: String!
created: DateTime
}
type ApiError {
statusCode: Int!
message: String!
}
type Query {
queryUserDetails(request: QueryUserRequest): QueryUserResponse
}
`;

export default typeDefs;
Loading

0 comments on commit f5ab771

Please sign in to comment.