Skip to content

Instantly share code, notes, and snippets.

View esko's full-sized avatar

Esko Pyyluoma esko

View GitHub Profile
@esko
esko / codegen.ts
Created April 23, 2024 05:43 — forked from ericclemmons/codegen.ts
graphql-codgen config for the best fully-typed, client-side GraphQL experience with TypeScript
import type {CodegenConfig} from '@graphql-codegen/cli';
const config: CodegenConfig = {
config: {
namingConvention: {
// Ensure enum values are the same as their name, not a number or camelCased
enumValues: 'keep',
},
},
schema: ['src/**/schema.graphql'],
@esko
esko / contentBuilderModal.jsx
Created April 4, 2024 18:34 — forked from kegansovay/contentBuilderModal.jsx
Sanity Custom Module Input Component
import React, { useState, useCallback } from 'react';
import {
Button,
Flex,
Dialog,
Grid,
Card,
Text,
Box,
TextInput
@esko
esko / remix-effect.ts
Created March 28, 2024 16:54 — forked from xesrevinu/remix-effect.ts
remix effect
export class InternalServerError extends Schema.TaggedError<InternalServerError>()("InternalServerError", {
message: Schema.string,
stack: Schema.optional(Schema.string, { exact: true }),
}) {
code = 500
}
export class AppError extends Schema.TaggedError<AppError>()("AppError", {
message: Schema.string,
}) {