Skip to content

Instantly share code, notes, and snippets.

var workdays = {
sunday: false,
monday: true,
tuesday: true,
wednesday: true,
thursday: true,
friday: true,
saturday: false
}
@allpwrfulroot
allpwrfulroot / GetAllTripsQuery.js
Created April 27, 2017 01:50
Problem solve grahpql
const GetAllTripsQuery = gql`
query GetAllTrips($tripargs: TripWhereArgs) {
viewer {
id
user {
id
domicile
abodes
trips(where: $tripargs, orderBy: { field: start, direction: DESC }) {
pageInfo {
@allpwrfulroot
allpwrfulroot / geolocation.js
Last active July 31, 2018 09:02
Funky error, async issue or geolocation bug? watchPositionAsync callback EXPLODES (counter goes to hundreds) if getCurrentPosition called?
import React, { Component } from 'react'
import {
ActivityIndicator,
View,
Text,
Alert
} from 'react-native'
import { Permissions, Location, Notifications, Constants } from 'expo'
import { graphql, gql, compose } from 'react-apollo'
import update from 'immutability-helper'