Using @defer under an array field will return multiple patches. Patches are unique combinations of label
and path
{
items {
id
...frag @defer(label: "my-label")
}
}
// @flow | |
import { ConnectionHandler } from 'relay-runtime'; | |
import { isObject, isArray } from 'lodash/fp'; | |
export function listRecordRemoveUpdater({ parentId, itemId, parentFieldName, store }) { | |
const parentProxy = store.get(parentId); | |
const items = parentProxy.getLinkedRecords(parentFieldName); | |
parentProxy.setLinkedRecords(items.filter(record => record._dataID !== itemId), parentFieldName); | |
} |
/* | |
A collection of tests where Flow and TypeScript might have different behavior | |
Some tests are borrowed from https://github.com/vkurchatkin/typescript-vs-flow | |
Some tests now have the same behavior as the new versions of Flow/TS have fixed the bugs and improved type safety | |
*/ | |
/* 1. Accessing unknown properties on objects */ |
Using @defer under an array field will return multiple patches. Patches are unique combinations of label
and path
{
items {
id
...frag @defer(label: "my-label")
}
}
#!/bin/sh | |
# Slightly modified to meet ArangoDB's needs. https://github.com/lumerit/s3-shell-backups | |
NOWDATE=`date +%Y-%m-%d` | |
LASTDATE=$(date +%Y-%m-%d --date='1 week ago') | |
USERNAME="${ARANGODB_USERNAME}" | |
PASSWORD="${ARANGODB_PASSWORD}" | |
DATABASE='dbname' |
#![recursion_limit = "300000"] | |
type CellType = u8; | |
const MEM_SIZE: usize = 30_000; | |
macro_rules! Hodor_impl { | |
/* | |
# Loop Extraction | |
git archive --format=zip HEAD `git diff HEAD~1..HEAD --name-only --diff-filter=d | grep -E 'config/locales/.+\.yml|frontend/translations/.+\.js'` > files-changed-to-translate.zip | |
// change 1 to number of commits in pr |
// Licensed under CC BY 4.0. | |
type $If<X: boolean, Then, Else = empty> = $Call< | |
& ((true, Then, Else) => Then) | |
& ((false, Then, Else) => Else), | |
X, | |
Then, | |
Else, | |
>; |
From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:
There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.
That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |