Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
anduong96 committed Nov 27, 2023
1 parent ffda30e commit 37ecfbc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ type Query {
airport(airportIata: String!): Airport!
airportTsaCheckpointsStatus(airportIata: String!, dayOfWeek: Float!): [AirportTsaCheckPointTerminal!]
airportTsaWaitTime(airportIata: String!): [AirportTsaWaitTime!]
airportWeather(airportIata: String!, date: Float!, hour: Float!, month: Float!, year: Float!): AirportWeather
airportWeather(airportIata: String!, date: Int!, hour: Int!, month: Int!, year: Int!): AirportWeather
flight(flightID: String!): Flight!
flightPromptness(flightID: String!): FlightPromptness!
flights(airlineIata: String!, date: Float!, flightNumber: String!, month: Float!, year: Float!): [Flight!]!
flights(airlineIata: String!, date: Int!, flightNumber: String!, month: Int!, year: Int!): [Flight!]!
randomFlight: Flight!
user: User!
userActiveFlights: [UserFlight!]!
Expand Down
10 changes: 5 additions & 5 deletions src/api/graphql/resolvers/airport.weather.resolver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Arg, Query, Resolver } from 'type-graphql';
import { Arg, Int, Query, Resolver } from 'type-graphql';

import { GQL_AirportWeather } from '@app/@generated/graphql/models/AirportWeather';
import { getAirportWeather } from '@app/services/airport.weather/get.airport.weather';
Expand All @@ -8,10 +8,10 @@ export class AirportWeatherResolver {
@Query(() => GQL_AirportWeather, { nullable: true })
async airportWeather(
@Arg('airportIata') iata: string,
@Arg('year') year: number,
@Arg('month') month: number,
@Arg('date') date: number,
@Arg('hour') hour: number,
@Arg('year', () => Int) year: number,
@Arg('month', () => Int) month: number,
@Arg('date', () => Int) date: number,
@Arg('hour', () => Int) hour: number,
) {
const result = await getAirportWeather({
airportIata: iata,
Expand Down
6 changes: 3 additions & 3 deletions src/api/graphql/resolvers/flight.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export class FlightResolver {
async flights(
@Arg('flightNumber') flightNumber: string,
@Arg('airlineIata') airlineIata: string,
@Arg('year') year: number,
@Arg('month') month: number,
@Arg('date') date: number,
@Arg('year', () => Int) year: number,
@Arg('month', () => Int) month: number,
@Arg('date', () => Int) date: number,
) {
const result = await getFlights({
airlineIata,
Expand Down

0 comments on commit 37ecfbc

Please sign in to comment.