View gist:94b8562661fb07d6cb67
(function($, undefined) { | |
/** | |
* Unobtrusive scripting adapter for jQuery | |
* | |
* Requires jQuery 1.6.0 or later. | |
* https://github.com/rails/jquery-ujs | |
* Uploading file using rails.js | |
* ============================= |
View gist:ab95552a743451ec958e
<div id="toolbar"> | |
<iframe id="toolBarPcFrame" src="http://192.168.240.36:8080/ets/ToolBarPcServlet" allowtransparency="true" | |
background-color="transparent" | |
style="position: fixed; z-index: 2147483640; width: 140.4px; height: 146.4px; margin: 0px; padding: 0px; bottom: 0px; right: 0px; border: none;"> | |
<html> | |
<head> | |
<meta name="viewport" | |
content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;"> | |
<meta name="format-detection" content="telephone=no"> | |
<style type="text/css"> |
View app_schema.js
// This gist is a draft solution for extending graphQL schemas generated by graffiti. | |
import { getSchema, addMongooseModel, getGQType, getExistedType } from 'lib/graffiti-mongoose/src/schema/schema2'; | |
import { User } from 'app/_schema/mongoose/user'; | |
import { Cv } from 'app/_schema/mongoose/cv'; | |
import { UserData } from 'app/_schema/mongoose/userData'; | |
import ExtraFieldsWrapper from 'lib/graffiti-mongoose/src/wrappers/extra-fields'; | |
import getFieldList from 'lib/graffiti-mongoose/src/query/projection'; |
View gist:bb0f4e050448225a8346cefa7077eab8
mutation { | |
deleteMovie(input: {clientMutationId:"123", id:"TW92aWU6NTZiODc5M2E4NzMwNzYxMjAwMGZhNWM2"}) { | |
clientMutationId | |
id | |
changedMovie { | |
id | |
title | |
} | |
changedMovieEdge { | |
cursor |
View batchRelayNetworkLayer.js
/* eslint-disable prefer-template, arrow-body-style */ | |
import 'whatwg-fetch'; | |
// import fetchWithRetries from 'fbjs/lib/fetchWithRetries'; | |
class AuthError extends Error {} | |
/** | |
* Rejects HTTP responses with a status code that is not >= 200 and < 300. | |
* This is done to follow the internal behavior of `fetchWithRetries`. |
View compose.js
/** | |
* Composes single-argument functions from right to left. The rightmost | |
* function can take multiple arguments as it provides the signature for | |
* the resulting composite function. | |
* | |
* @param {...Function} funcs The functions to compose. | |
* @returns {Function} A function obtained by composing the argument functions | |
* from right to left. For example, compose(f, g, h) is identical to doing | |
* (...args) => f(g(h(...args))). | |
*/ |
View graphql-js-on-flow27-errors.txt
src/utilities/buildASTSchema.js:257 | |
257: locations: directiveAST.locations.map(node => node.value), | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `map` | |
257: locations: directiveAST.locations.map(node => node.value), | |
^^^^^^^^^^ some string with unknown value. Property not found in | |
97: locations: Array<DirectiveLocationEnum>; | |
^^^^^^^^^^^^^^^^^^^^^ object literal. See: src/type/directives.js:97 | |
src/utilities/buildASTSchema.js:258 | |
258: args: makeInputValues(directiveAST.arguments), |
View routes.js
import React from 'react'; | |
import Relay from 'react-relay'; | |
import { relayStore } from 'app/clientStores'; // relayStore = Relay.Store; | |
import App from 'app/_components/App/App'; | |
import Menu from 'app/Menu/Menu'; | |
import MainPage from 'app/MainPage/MainPage'; | |
import Page404 from 'app/_components/Page404/Page404'; | |
import LoadingPage from 'app/_components/LoadingPage/LoadingPage'; | |
import BrokenPage from 'app/_components/BrokenPage/BrokenPage'; |
View relayStore.js
let relayStore; | |
function relayCreateStore() { | |
const env = new Relay.Environment(); | |
env.injectNetworkLayer(new Relay.DefaultNetworkLayer('/graphql')); | |
if (__DEV__) { | |
RelayNetworkDebug.init(env); | |
} | |
env.reset = () => relayCreateStore(); | |
env.mutate = ({ | |
query, |
View .flowconfig
[ignore] | |
.*/build/.* | |
.*/tools/.* | |
.*/node_modules/.*/test/.* | |
.*/node_modules/.*/tests/.* | |
.*/node_modules/ajv.* | |
.*/node_modules/acorn.* | |
.*/node_modules/async.* | |
.*/node_modules/babel.* | |
.*/node_modules/bluebird.* |
OlderNewer