Skip to content

Commit b026662

Browse files
committed
upddates solution relay
1 parent 88458e7 commit b026662

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/index.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ const CHARACTER_TYPE = "Character";
1111
const EPISODE_TYPE = "Episode";
1212

1313
const typeDefs = gql`
14-
# do I need this?
15-
# interface Node {
16-
# id: ID!
17-
# }
14+
interface INode {
15+
id: ID!
16+
}
1817
1918
union Node = Character | Episode
2019
@@ -37,8 +36,8 @@ const typeDefs = gql`
3736
edges: [CharacterEdge]
3837
}
3938
40-
type Character {
41-
id: ID
39+
type Character implements INode {
40+
id: ID!
4241
name: String
4342
status: String
4443
episodes: [Episode]
@@ -67,10 +66,7 @@ const typeDefs = gql`
6766
const resolvers = {
6867
Query: {
6968
charactersConnection: async (_, args) => {
70-
// give this to students
71-
// const pageInfo = {};
72-
// const edges = [];
73-
// solution first part
69+
// partial solution
7470
// const characters = await fetchCharactersData();
7571
// const pageInfo = {
7672
// hasNextPage: characters.info.next,

0 commit comments

Comments
 (0)