Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Aug 6, 2023
1 parent 9f912f6 commit c94d7df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@
onEditQuery: onEditQuery,
onEditVariables: onEditVariables,
onEditOperationName: onEditOperationName,
plugins: [explorerPlugin]
plugins: [explorerPlugin],
shouldPersistHeaders: true,
}),
document.body
);
Expand Down
2 changes: 1 addition & 1 deletion src/schema/apiHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function getObjectFromUrl(url: string): Promise<ObjectWithId> {
*/
export async function getObjectFromTypeAndId(
type: endPoints,
id: string,
id: string | number,
): Promise<ObjectWithId> {
return await getObjectFromUrl(`https://swapi.dev/api/${type}/${id}/`);
}
Expand Down
6 changes: 0 additions & 6 deletions src/schema/relayNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ import StarshipType from './types/starship.js';
import VehicleType from './types/vehicle.js';
import { endPoints } from '../types.js';

// export function swapiTypeToGraphQLType(swapiType: 'films'): typeof FilmType;
// export function swapiTypeToGraphQLType(swapiType: 'people'): typeof PersonType;
// export function swapiTypeToGraphQLType(swapiType: 'planets'): typeof PlanetType;
// export function swapiTypeToGraphQLType(swapiType: 'species'): typeof SpeciesType;
// export function swapiTypeToGraphQLType(swapiType: 'starships'): typeof StarshipType;
// export function swapiTypeToGraphQLType(swapiType: 'vehicles'): typeof VehicleType;
/**
* Given a "type" in SWAPI, returns the corresponding GraphQL type.
*/
Expand Down

0 comments on commit c94d7df

Please sign in to comment.