0
Resolver file
@Resolver()
export class LaunchResolver {
private readonly client: ApolloClient<any>;
constructor() {
this.client = new ApolloClient({
uri: 'https://spacex-production.up.railway.app/graphql',
cache: new InMemoryCache(),
});
}
@Query('launches')
async getLaunches(): Promise<Launch[]> {
const response = await this.client.query({
query: gql`
query GetLaunches {
launches {
mission_name
launch_date_utc
}
}
`,
});
return response.data.launches;
}
}
I am running this uri behind the proxy e.g abc.xyz.com:8000
Not sure how use proxy to reach this api and query the data, let me know if you worked on it.
Thanks
|