Skip to content

Instantly share code, notes, and snippets.

View a-essawy's full-sized avatar

Abdelrahman Essawy a-essawy

  • Enegix Inc.
  • Alexandria, Egypt
  • 12:06 (UTC +03:00)
  • LinkedIn in/a-essawy
View GitHub Profile
@a-essawy
a-essawy / export-collection.js
Created November 27, 2024 09:57
Download Postman Collection using Node.js
const fs = require('fs');
const path = require('path');
const https = require('https');
// Configuration
const postmanApiKey =
'YOUR-API-KEY';
const postmanCollectionId = 'COLLECTION-ID';
const outputFilePath = path.join(__dirname, 'postman-spec.json');
import { useContext, useEffect, useState, useTransition } from 'react';
import { Box, Typography, Fab, List, ListItem, ListItemText, Button, TextField, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';
import Avatar from '../../assets/images/avatar.png';
import CustomAppBar from '../../components/CustomAppBar/CustomAppBar';
import Edit from '@mui/icons-material/Edit';
import Check from '@mui/icons-material/Check';
import Styles from './ProfilePage.module.css';
import { useTranslation } from 'react-i18next';
import UserAvatar from '../../components/UserAvatar/UserAvatar';
@a-essawy
a-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';
@a-essawy
a-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';
@a-essawy
a-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;
@a-essawy
a-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 {