Skip to content

Instantly share code, notes, and snippets.

View addityasingh's full-sized avatar
💻
Focusing

Aditya Pratap Singh addityasingh

💻
Focusing
View GitHub Profile
(function () {
'use strict';
angular
.module('app', [])
.config(config);
config.$inject = ['$provide'];
function config($provide) {
import {foo, bar} from '../foo-bar';
import * as abc from '../util'
import * as https from 'https'
describe("asdf", () => {
test("foo", async () => {
jest.spyOn(https, 'request').mockImplementation(() => jest.fn() as any);
await foo('https://example.org');
expect(https.request).toHaveBeenCalledWith('https://example.org');
})
@addityasingh
addityasingh / graphql.md
Created June 13, 2019 15:20
Notes from LeadDevLondon conference

Conversation with use of Graphql at twitter

  • They are doing it gradually
  • They use Noun instead of Entity to name the graphql entities
  • So far migrated User and Tweet nouns
  • Struggled with de-duplicating response
  • Plan is to migrate gradually
  • They use Strato, their internal technology for virtual federated database, to power all graphql queries by plugging Strato with FB's Thrift services which provides them type safety