Skip to content

Instantly share code, notes, and snippets.

View abdelrahman-essawy's full-sized avatar

Abdelrahman Essawy abdelrahman-essawy

View GitHub Profile
@abdelrahman-essawy
abdelrahman-essawy / resource.dto.ts
Created February 8, 2024 11:25
resource.dto.ts and it's generated schema
import {
Directive,
Field,
GraphQLISODateTime,
ID,
ObjectType,
registerEnumType,
} from '@nestjs/graphql';
import { FilterableField, IDField } from '@ptc-org/nestjs-query-graphql';
@abdelrahman-essawy
abdelrahman-essawy / room.dto.ts
Created February 8, 2024 11:24
room.dto.ts and it's generated schema
import {
Directive,
Field,
GraphQLISODateTime,
ID,
ObjectType,
registerEnumType,
} from '@nestjs/graphql';
import { IRoom, IRoomDatabaseEntity, RoomType } from '@core';
import { FilterableField, IDField } from '@ptc-org/nestjs-query-graphql';
@abdelrahman-essawy
abdelrahman-essawy / user.dto.ts
Last active February 8, 2024 11:28
user.dto.ts and it's generated schema
import { Directive, ID, ObjectType, registerEnumType } from '@nestjs/graphql';
import { FilterableField, IDField } from '@ptc-org/nestjs-query-graphql';
import { IUser, UserRole } from '@core';
@ObjectType()
@Directive('@key(fields: "id")')
export class UserDto implements Omit<IUser, 'password' | 'hashedRefreshToken'> {
@IDField(() => ID)
id: string;
@abdelrahman-essawy
abdelrahman-essawy / terminal output.sh
Last active February 8, 2024 11:32
Subset of the errors when composing the subgraphs using Rover Cli
$ rover supergraph compose --config ./supergraph.yaml -o supergraph.graphql
resolving SDL for subgraphs defined in ./supergraph.yaml
composing supergraph with Federation v2.3.2.exe
error[E029]: Encountered 28 build errors while trying to build a supergraph.
Caused by:
UNKNOWN: The following supergraph API query:
mutation {
refreshToken {
user {