File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,9 @@ const CHARACTER_TYPE = "Character";
11
11
const EPISODE_TYPE = "Episode" ;
12
12
13
13
const typeDefs = gql `
14
- # do I need this?
15
- # interface Node {
16
- # id: ID!
17
- # }
14
+ interface INode {
15
+ id: ID!
16
+ }
18
17
19
18
union Node = Character | Episode
20
19
@@ -37,8 +36,8 @@ const typeDefs = gql`
37
36
edges: [CharacterEdge]
38
37
}
39
38
40
- type Character {
41
- id: ID
39
+ type Character implements INode {
40
+ id: ID!
42
41
name: String
43
42
status: String
44
43
episodes: [Episode]
@@ -67,10 +66,7 @@ const typeDefs = gql`
67
66
const resolvers = {
68
67
Query : {
69
68
charactersConnection : async ( _ , args ) => {
70
- // give this to students
71
- // const pageInfo = {};
72
- // const edges = [];
73
- // solution first part
69
+ // partial solution
74
70
// const characters = await fetchCharactersData();
75
71
// const pageInfo = {
76
72
// hasNextPage: characters.info.next,
You can’t perform that action at this time.
0 commit comments