Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update example "with-typescript-graphql" (#10637)
* add peerDeps of graphql-let * ncu -u && typesync * Use resolver types for resolver implementation
- Loading branch information
1 parent
c57cdbb
commit ccb42b0
Showing
4 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.next | ||
node_modules | ||
__generated__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ plugins: | |
- typescript | ||
- typescript-operations | ||
- typescript-react-apollo | ||
respectGitIgnore: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import { IResolvers } from 'apollo-server-micro' | ||
import { QueryResolvers } from './type-defs.graphqls' | ||
|
||
const resolvers: IResolvers = { | ||
Query: { | ||
viewer(_parent, _args, _context, _info) { | ||
return { id: 1, name: 'John Smith', status: 'cached' } | ||
}, | ||
const Query: Required<QueryResolvers> = { | ||
viewer(_parent, _args, _context, _info) { | ||
return { id: String(1), name: 'John Smith', status: 'cached' } | ||
}, | ||
} | ||
|
||
export default resolvers | ||
export default { Query } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters