This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const os = require('os') | |
const vm = require('vm') | |
const yaml = require('js-yaml') | |
const { paramCase } = require('change-case') | |
const { GraphQLClient } = require('graphql-request') | |
const cmd = process.argv[2] | |
const MIGRATION_PATH = `./db/migrations` | |
const isLocalTarget = target => target.startsWith('local/') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Base64 } from 'js-base64' | |
import { Op } from 'sequelize' | |
import { fromGlobalId } from 'graphql-relay' | |
// https://github.com/graphql/graphql-relay-js/issues/94#issuecomment-232410564 | |
const effectiveOrder = ({ last }, orderBy) => { | |
/* adds `id ASC` to end of `ORDER BY` if `id` is not already in the `ORDER BY` clause | |
flips `ASC` to `DESC` (and vice-versa) if pagination arg `last` is defined | |
*/ |
OlderNewer