Skip to content

Instantly share code, notes, and snippets.

View carloseberhardt's full-sized avatar

Carlos Eberhardt carloseberhardt

View GitHub Profile

Naming

  1. Use PascalCase for the names of Types, Enums, Interfaces, Scalars, and Unions and Input Types.
  2. Use camelCase for Field names, Argument names, and Directive names.
  3. Use SNAKE_CASE for Enum values.
  4. Use the suffix "Input" for Input types. (this caused argument and we ended up dropping it)
  5. Use singular for Type names E.g. User, not Users.. Pet, not Pets
  6. Mutation fields should start with the "action" .. createCustomer, deleteCustomer, etc.
  7. Query and Subscription fields should not start with the "action" .. no "getCustomers" or "getCustomer" .. just "customers" and "customer"
  8. Query and Subscription fields should indicate if a single object or a collection is expected in response "customer" gets one customer. "customers" gets a collection of customer objects.
  9. Any names/identifiers starting with __ (double underscore) are reserved by the GraphQL specification
@carloseberhardt
carloseberhardt / results.xml
Last active March 29, 2022 18:57
sample-ota-1
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OTA_HotelProductRS Version="1.0"
TimeStamp="2016-05-26T11:11:50-04:00"
EchoToken="001-1466531393"
xmlns="http://www.opentravel.org/OTA/2003/05">
<Success />
<HotelProducts HotelCode="HOTEL001">
<HotelProduct>
<RatePlans>
<RatePlan RatePlanCode="BAR" RatePlanName="Best Available Rate" BaseOccupancy="2" CurrencyCode="USD" />
#!/bin/sh
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Max length of the OSC 52 sequence. Sequences longer than this will not be
# sent to the terminal.
OSC_52_MAX_SEQUENCE="100000"
# Write an error message and exit.
# Usage: <message>
die() {
0e26a96c91636b16ae17b321759cc028c0e01337-organization=amer-demo6&access_token=eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiIyM2Y3MzBjZS1lZGU4LTQ2MzAtYmVjNC05ZWY0ZmVlZGYwZjMiLCJzdWIiOiIxZmM5MTc2OC1hMWZjLTRkMjgtYmQ1YS1iM2I1NTFhNjczN2YiLCJzY29wZSI6WyJwYXNz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C5hcHByb3ZhbHMiXSwiY2xpZW50X2lkIjoiZWRnZXVpIiwiY2lkIjoiZWRnZXVpIiwiYXpwIjoiZWRnZXVpIiwiZ3JhbnRfdHlwZSI6ImF1dGhvcml6YXRpb25fY29kZSIsInVzZXJfaWQiOiIxZmM5MTc2OC1hMWZjLTRkMjgtYmQ1YS1iM2I1NTFhNjczN2YiLCJvcmlnaW4iOiJ1c2VyZ3JpZCIsInVzZXJfbmFtZSI6ImNhcmxvc0BhcGlnZWUuY29tIiwiZW1haWwiOiJjYXJsb3NAYXBpZ2VlLmNvbSIsInJldl9zaWciOiI5MjI3OTE4YiIsImlhdCI6MTQ2ODUxMzU1NiwiZXhwIjoxNDY4NTE1MzU2LCJpc3MiOiJodHRwczovL2xvZ2luLmFwaWdlZS5jb20vb2F1dGgvdG9rZW4iLCJ6aWQiOiJ1YWEiLCJhdWQiOlsic2NpbSIsInBhc3N3b3JkIiwib3BlbmlkIiwiYXBwcm92YWxzIiwiZWRnZXVpIiwib2F1dGgiXX0.NGt-8DBXNiPfB_SqU6Oa9vsI5Gytfv_Hc-GINEoNCf60BdsLfN7ao9dmlwBttn9Tt5Woyd18aMdRb-swTD8X87iOZheygpU50cg7icGIm5o8ZjmbmJiWSLV5dyMm2H62yv2ySTmCIIbZQv22gEyMxIkcDRv8WsUKMc_tMT5-zWNvrWilH

Keybase proof

I hereby claim:

  • I am carloseberhardt on github.
  • I am carloseberhardt (https://keybase.io/carloseberhardt) on keybase.
  • I have a public key whose fingerprint is 4D5C 438E F323 89FA DAB5 E66E E5A3 2CD3 3867 4BB2

To claim this, I am signing this object:

@carloseberhardt
carloseberhardt / convertJsonPropNames.js
Last active August 29, 2015 13:56
Javascript callout for the Apigee Edge platform. This script will convert JSON attribute names to camelCase from hyphen-case or underscore_case and vice versa. Work remains to be done on the inbound flow.
function convertProps(obj, propNameConverterFn) {
var r, p, thing, i, L, what = Object.prototype.toString, wo = what.call(obj);
if (wo == "[object Object]") {
r = {};
for (p in obj) {
if (obj.hasOwnProperty(p)) {
thing = obj[p];
if (what.call(thing) == "[object Object]" || what.call(thing) == "[object Array]") {