Skip to content

Commit e1aa2cc

Browse files
committed
Fix GraphQLObjectType being depracated
1 parent 48a374a commit e1aa2cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/Marked/swapiSchema.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,10 @@ const resolvers = {
383383
Character: {
384384
__resolveType(data, context, info){
385385
if(humanData[data.id]){
386-
return info.schema.getType('Human');
386+
return 'Human';
387387
}
388388
if(droidData[data.id]){
389-
return info.schema.getType('Droid');
389+
return 'Droid';
390390
}
391391
return null;
392392
},
@@ -467,13 +467,13 @@ const resolvers = {
467467
SearchResult: {
468468
__resolveType(data, context, info){
469469
if(humanData[data.id]){
470-
return info.schema.getType('Human');
470+
return 'Human';
471471
}
472472
if(droidData[data.id]){
473-
return info.schema.getType('Droid');
473+
return 'Droid';
474474
}
475475
if(starshipData[data.id]){
476-
return info.schema.getType('Starship');
476+
return 'Starship';
477477
}
478478
return null;
479479
},

0 commit comments

Comments
 (0)