Skip to content

Commit c94d7df

Browse files
committed
cleanup
1 parent 9f912f6 commit c94d7df

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

public/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@
121121
onEditQuery: onEditQuery,
122122
onEditVariables: onEditVariables,
123123
onEditOperationName: onEditOperationName,
124-
plugins: [explorerPlugin]
124+
plugins: [explorerPlugin],
125+
shouldPersistHeaders: true,
125126
}),
126127
document.body
127128
);

src/schema/apiHelper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export async function getObjectFromUrl(url: string): Promise<ObjectWithId> {
4141
*/
4242
export 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
}

src/schema/relayNode.ts

-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ import StarshipType from './types/starship.js';
2020
import VehicleType from './types/vehicle.js';
2121
import { 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
*/

0 commit comments

Comments
 (0)