Skip to content

Instantly share code, notes, and snippets.

View lorensr's full-sized avatar

Loren ☺️ lorensr

View GitHub Profile
import { InMemoryLRUCache } from 'apollo-server-caching'
...
initialize({ context, cache } = {}) {
this.context = context
this.cache = cache || new InMemoryLRUCache()
}
import { DataSource } from 'apollo-datasource'
import DataLoader from 'dataloader'
class FooDataSource extends DataSource {
constructor(dbClient) {
super()
this.db = dbClient
this.loader = new DataLoader(ids => dbClient.getByIds(ids))
}
import { DataSource } from 'apollo-datasource'
import { InMemoryLRUCache } from 'apollo-server-caching'
import DataLoader from 'dataloader'
class FooDataSource extends DataSource {
constructor(dbClient) {
super()
this.db = dbClient
this.loader = new DataLoader(ids => dbClient.getByIds(ids))
}
=> App running at: http://localhost:3000/
=> Started app on Android Device.
I20190113-01:03:51.333(1)? I/CordovaLog(29528): Changing log level to DEBUG(3)
I20190113-01:03:51.364(1)? I/chromium(29528): [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0
I20190113-01:03:51.364(1)? W/MeteorWebApp(29528): Loading asset bundle from directory file:///android_asset/www/application
I20190113-01:03:51.364(1)? W/MeteorWebApp(29528): Asset / found in bundle b96242b11ac30d186162794a8281039a4c641e89:file:///android_asset/www/application
I20190113-01:03:51.364(1)? W/MeteorWebApp(29528): Asset /__cordova/merged-stylesheets.css found in bundle b96242b11ac30d186162794a8281039a4c641e89:file:///android_asset/www/application
I20190113-01:03:51.364(1)? W/MeteorWebApp(29528): Asset /cordova.js not found in bundle b96242b11ac30d186162794a8281039a4c641e89:file:///android_asset/www/application, no parent bundle
I20190113-01:03:51.365(1)? W/MeteorWebApp(29528): Asset /__cordova/packages/meteor
hcp-repro $ meteor run android-device --mobile-server "192.168.0.189:3000"
[[[[[ ~/jobs/hcp-repro ]]]]]
=> Started proxy.
WARNING: Attempting to install plugin cordova-plugin-statusbar@2.2.1, but it should have a minimum version of 2.3.0 to ensure compatibility with the
current platform versions. Installing the minimum version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-splashscreen@4.0.1, but it should have a minimum version of 4.1.0 to ensure compatibility with the
current platform versions. Installing the minimum version for convenience, but you should adjust your dependencies.
=> Started MongoDB.
Subproject Path: CordovaLibns [=========== ] 40% 8.4s
@lorensr
lorensr / contributor-agreement.md
Last active June 23, 2018 02:23
Contributor Agreement

GraphQL Guide Contributor Agreement

This GraphQL Guide Contributor Agreement (this "Agreement") applies to any Contribution you make to any Work.

This is a binding legal agreement on you and any organization you represent. If you are signing this Agreement on behalf of your employer or other organization, you represent and warrant that you have the authority to agree to this Agreement on behalf of the organization.

1. Definitions

"Contribution" means any original work, including any modification of or addition to an existing work, that you submit to The GraphQL Guide in any manner for inclusion in any Work.

macbook:todos me$ git:(master) 5M DEBUG=nightmare:*,electron:* TEST_BROWSER_VISIBLE=1 TEST_BROWSER_DRIVER=nightmare meteor test --once --driver-package dispatch:mocha
[[[[[ Tests ]]]]]
=> Started proxy.
=> Started MongoDB.
W20170331-20:05:34.861(-4)? (STDERR) Note: you are using a pure-JavaScript implementation of bcrypt.
W20170331-20:05:35.301(-4)? (STDERR) While this implementation will work correctly, it is known to be
W20170331-20:05:35.301(-4)? (STDERR) approximately three times slower than the native implementation.
W20170331-20:05:35.302(-4)? (STDERR) In order to use the native implementation instead, run
W20170331-20:05:35.303(-4)? (STDERR)

Keybase proof

I hereby claim:

  • I am lorensr on github.
  • I am lorensr (https://keybase.io/lorensr) on keybase.
  • I have a public key whose fingerprint is 356A 3B12 19AC E975 2FFF 4423 6EF7 6787 12F6 9A11

To claim this, I am signing this object:

import { mockServer, MockList } from 'graphql-tools';
import casual from 'casual-browserify';
// customize mocking per type (i.e. Integer, Float, String)
mockServer(schema, {
Int: () => 6,
Float: () => 22.1,
String: () => 'Hello',
});
> location.reload()
< undefined
[Error] Deprecated attempt to access property 'userAgent' on a non-Navigator object.
(anonymous function) (logging.js, line 345)
global code (logging.js, line 354)
[Error] Deprecated attempt to access property 'userAgent' on a non-Navigator object.
(anonymous function) (random.js, line 256)
global code (random.js, line 300)
[Error] Deprecated attempt to access property 'userAgent' on a non-Navigator object.
_launchConnection (ddp.js, line 2698)