This file contains 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
# frozen_string_literal: true | |
module Types | |
class BaseConnection < BaseObject | |
# For some reason these are needed, they call through to the underlying connection wrapper. | |
extend Forwardable | |
def_delegators :@object, :cursor_from_node, :parent | |
# When this class is extended, add the default connection behaviors. | |
# This adds a new `graphql_name` and description, and searches |
This file contains 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
// this is an example model | |
import ObjectProxy from "@ember/object/proxy"; | |
function objectEqual(a, b) { | |
if (typeOf(a) === "instance" || typeOf(b) === "instance") { | |
return isEqual(a, b); | |
} else if (typeOf(a) === "object" && typeOf(b) === "object") { | |
return Object.entries(a).every(([propname, value]) => { | |
return b[propname] === value; |
This file contains 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
class FieldAccessInstrumentation | |
attr_reader :current_user_key | |
def initialize(current_user_key = :current_user) | |
@current_user_key = current_user_key | |
end | |
def instrument(type, field) | |
field = instrument_type(type, field) if type.metadata[:access] | |
# only add the field access check if it exists and isn't identical to the |
This file contains 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
diff --git a/yarn.lock b/yarn.lock | |
index 72eb98e..912a492 100644 | |
--- a/yarn.lock | |
+++ b/yarn.lock | |
@@ -48,9 +48,9 @@ | |
dependencies: | |
"@glimmer/util" "^0.22.3" | |
-"@glimmer/resolver@^0.3.0": | |
- version "0.3.0" |
This file contains 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
/** | |
This is an implementation of Zigbee device communication using an XBee | |
and a Centralite Smart Switch 4256050-ZHAC | |
dave (www.desert-home.com) | |
source: http://www.desert-home.com/2014/10/zigbee-protocol-xbee-but-this-time.html | |
*/ | |
// This code will handle both a Uno and a Mega2560 by careful use of | |
// the defines. I tried it on both of them, and the only problem is that |
This file contains 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
/* global require, module */ | |
var EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
var Filter = require('broccoli-filter'); | |
var Funnel = require('broccoli-funnel'); | |
module.exports = function(defaults) { | |
var env = EmberApp.env(); | |
var isProductionLikeBuild = ['production', 'staging'].indexOf(env) > -1; | |
var ENV = defaults.project.config(env); |
This file contains 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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'input', | |
attributeBindings: [ 'type', 'value', 'placeholder', 'data-stripe', 'name' ], | |
type: 'text', | |
_sanitizedValue: undefined, | |
input() { this._handleChangeEvent(); }, | |
change() { this._handleChangeEvent(); }, |
This file contains 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
# forked from: | |
# https://github.com/rails/rails/blob/a373be9da45d4bee684ea03420212780ec1ef4b1/actioncable/lib/action_cable/subscription_adapter/postgresql.rb | |
gem 'pg', '~> 0.18' | |
require 'pg' | |
require 'thread' | |
module ActionCable | |
module SubscriptionAdapter | |
class PostgresqlSequel < Base # :nodoc: |
This file contains 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 Ember from 'ember'; | |
import { task } from 'ember-concurrency'; | |
const PersonItem = Ember.Component.extend({ | |
person: null, | |
editMode: false, | |
changePerson: null, | |
latestPost: Ember.computed.oneWay('person.latestPost'), | |
This file contains 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
queryParams: 'timeframe', | |
timeframe: null | |
}); |
NewerOlder