Skip to content

Instantly share code, notes, and snippets.

View kidunot89's full-sized avatar
🎧
In the zone

Geoff Taylor kidunot89

🎧
In the zone
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kidunot89 on github.
  • I am kidunot89 (https://keybase.io/kidunot89) on keybase.
  • I have a public key ASCuQV1g0q7u5WmS564FvvkgtiElYnOuubpttytEqhaWgQo

To claim this, I am signing this object:

@kidunot89
kidunot89 / apollo-client.js
Last active July 10, 2020 05:43
useCartMutations - React Hook that use "@apollo-react-hooks", and "uuid" to bundle WooGraphQL cart mutations in a modular tool.
// Node modules
import { ApolloClient } from 'apollo-client';
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache, defaultDataIdFromObject } from 'apollo-cache-inmemory';
import { ApolloLink } from 'apollo-link';
import { onError } from 'apollo-link-error';
import { get, isEmpty } from 'lodash';
// Local imports
import { typeDefs, resolvers } from './schema';
@kidunot89
kidunot89 / wordpress-setting-patch.php
Created March 25, 2019 19:19
Add loads more WP core settings into the Settings API
<?php
/**
* Registers WordPress options not loaded by Settings API by default
*/
function patch_whitelist_options() {
$whitelist_options = array(
'discussion' => array(
'default_pingback_flag' => array(
'show_in_rest' => true,
'type' => 'boolean',