Skip to content

Instantly share code, notes, and snippets.

View mlwilkerson's full-sized avatar

Mike Wilkerson mlwilkerson

View GitHub Profile
@mlwilkerson
mlwilkerson / array_type_null.rb
Created March 6, 2019 16:12
Demonstrate field resolution of an array of objects of authorized types where one or more objects fail authorization
require 'graphql'
class Bar < GraphQL::Schema::Object
field :color, String, null: false
def self.authorized?(object, _context)
object[:color] === 'red'
end
end
@mlwilkerson
mlwilkerson / functions.php
Last active June 14, 2018 22:22
Add Font Awesome 5 Pro to WordPress Theme: SVG with JS - All
/**
* Font Awesome 5 Pro: SVG with JS, loading all icon styles from CDN
*
* This will just load everything--with all Pro icons in all styles.
*
* INSTALL:
*
* 1. Paste into the functions.php file of your WordPress theme.
* 2. You must also login to your fontawesome.com account and whitelist your web site as a
* Pro CDN domain:
@mlwilkerson
mlwilkerson / functions.php
Last active June 14, 2018 22:22
Add Font Awesome 5 Free to WordPress Theme: SVG with JS - All
/**
* Font Awesome 5 Free: SVG with JS, loading all icon styles from CDN
*
* This will just load everything--with all Free icons in all styles.
*
* INSTALL:
*
* 1. Paste into the functions.php file of your WordPress theme.
*
* USE: