File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 121121 onEditQuery : onEditQuery ,
122122 onEditVariables : onEditVariables ,
123123 onEditOperationName : onEditOperationName ,
124- plugins : [ explorerPlugin ]
124+ plugins : [ explorerPlugin ] ,
125+ shouldPersistHeaders : true ,
125126 } ) ,
126127 document . body
127128 ) ;
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export async function getObjectFromUrl(url: string): Promise<ObjectWithId> {
4141 */
4242export async function getObjectFromTypeAndId (
4343 type : endPoints ,
44- id : string ,
44+ id : string | number ,
4545) : Promise < ObjectWithId > {
4646 return await getObjectFromUrl ( `https://swapi.dev/api/${ type } /${ id } /` ) ;
4747}
Original file line number Diff line number Diff line change @@ -20,12 +20,6 @@ import StarshipType from './types/starship.js';
2020import VehicleType from './types/vehicle.js' ;
2121import { endPoints } from '../types.js' ;
2222
23- // export function swapiTypeToGraphQLType(swapiType: 'films'): typeof FilmType;
24- // export function swapiTypeToGraphQLType(swapiType: 'people'): typeof PersonType;
25- // export function swapiTypeToGraphQLType(swapiType: 'planets'): typeof PlanetType;
26- // export function swapiTypeToGraphQLType(swapiType: 'species'): typeof SpeciesType;
27- // export function swapiTypeToGraphQLType(swapiType: 'starships'): typeof StarshipType;
28- // export function swapiTypeToGraphQLType(swapiType: 'vehicles'): typeof VehicleType;
2923/**
3024 * Given a "type" in SWAPI, returns the corresponding GraphQL type.
3125 */
You can’t perform that action at this time.
0 commit comments