profile
viewpoint
Kazuhito Hokamura hokaccha @cookpad Tokyo. Japan Software engineer

bdash-app/bdash 1327

Simple SQL Client for lightweight data analysis.

hokaccha/backbone-hands-on 20

Backbone.js ハンズオン講座

hokaccha/apimock-middleware 9

connect middleware for API Mocking.

hokaccha/atom-japanese-dictionary 8

英和/和英の辞書を引くためのAtomパッケージ

hokaccha/atom-open-github-from-npm 4

Open GitHub URL from npm package name

5509/EIP 3

Edit In place

hokaccha/backbone 2

Give your JS App some Backbone with Models, Views, Collections, and Events

hokaccha/connect 2

Connect is a middleware layer for Node.js

push eventhokaccha/serverless-open-graph-api

Kazuhito Hokamura

commit sha 7f43fd8b1054739d3d4db6c048897ef36a899fcb

init

view details

push time in 11 days

create barnchhokaccha/serverless-open-graph-api

branch : master

created branch time in 11 days

created repositoryhokaccha/serverless-open-graph-api

created time in 11 days

push eventhokaccha/hello-wasm

Kazuhito Hokamura

commit sha 6ec8cdb4310be0ed46593206d0d04f314843f1ee

Use relative path

view details

push time in 15 days

push eventhokaccha/hello-wasm

Kazuhito Hokamura

commit sha e434f8c2f995da3b68724fd0a932300f4c9fd12c

update

view details

push time in 15 days

create barnchhokaccha/hello-wasm

branch : master

created branch time in 15 days

created repositoryhokaccha/hello-wasm

created time in 15 days

push eventadventar/adventar

Kazuhito Hokamura

commit sha 48953b2c6c18f6000f984c25d2784ccdcaed662c

Refactoring: squirrel

view details

push time in 16 days

PR opened graphql/express-graphql

Fix type for customFormatErrorFn

customFormatErrorFn may be passed HttpError as well as GraphQLError. So the argument type of customFormatErrorFn should be GraphQLError | HttpError.

Example

import { graphqlHTTP } from "express-graphql";
import express from "express";
import { buildSchema, formatError, GraphQLError, GraphQLFormattedError } from "graphql";
import { HttpError } from "http-errors";

const app = express();

const schema = buildSchema(`
  type Query {
    hello: String
  }
`);

app.use(
  "/graphql",
  graphqlHTTP(() => {
    return {
      schema,
      customFormatErrorFn: (err: GraphQLError): GraphQLFormattedError => {
        (err as any).extensions = {
          name: err.name,
          isHttpError: err instanceof HttpError,
        };
        return formatError(err);
      },
    };
  })
);

app.listen(8000);
$ curl -s -X POST http://localhost:8000/graphql | jq
{
  "errors": [
    {
      "message": "Must provide query string.",
      "extensions": {
        "name": "BadRequestError",
        "isHttpError": true
      }
    }
  ]
}
+5 -2

0 comment

2 changed files

pr created time in 18 days

push eventhokaccha/express-graphql

Kazuhito Hokamura

commit sha 24edfff615810766ef90518aebc9365df4b9e8e9

Fix type for customFormatErrorFn

view details

push time in 18 days

create barnchhokaccha/express-graphql

branch : fix-customFormatErrorFn-type

created branch time in 18 days

fork hokaccha/express-graphql

Create a GraphQL HTTP server with Express.

fork in 18 days

push eventadventar/adventar

Kazuhito Hokamura

commit sha 45e3cb47a3d7cca23600de3637e86b71a2d07c60

Fix embed settings

view details

push time in 19 days

push eventadventar/adventar

Kazuhito Hokamura

commit sha ab71c41fb855f5c48a5c660b72aae3b4ee8c0ee7

Support oembed

view details

push time in 20 days

created repositoryhokaccha/test-repo

created time in 20 days

push eventadventar/adventar

Kazuhito Hokamura

commit sha 2cc1f12365b0032c3969c14108a0c247401e963b

Refactoring: use sqlx

view details

push time in 22 days

push eventadventar/adventar

Kazuhito Hokamura

commit sha b2b98f1850f67efbe06a352292f231d74ebb09b4

Use sqlx instead of database/sql

view details

Kazuhito Hokamura

commit sha 1c57dc4d8313c81a7ba2256409a912b7b9cce9b4

Add db tag to models

view details

Kazuhito Hokamura

commit sha d5ae1ca80f14b52b9ffb44e7409d964771a111cc

Separate files per rpc

view details

push time in 23 days

issue commentform-data/form-data

Does form-data support fs-capacitor stream?

My workaround is using formdata-node.

import FormData from "formdata-node";

...

const form = new FormData();
form.set("file", file.createReadStream(), file.filename);

await fetch(url, {
  method: "POST",
  body: form.stream,
  headers: form.headers,
});
igat64

comment created time in 2 months

delete branch hokaccha/next.js

delete branch : improve-sentry-example-ssr

delete time in 2 months

PR opened vercel/next.js

Reviewers
Update Sentry example to improve display of server errors

In the Sentry example, sourcemaps is not enabled in server error.

I solved this problem by using RewriteFrames. On the client side, the sourcemaps path is ~/_next, but on the server side it needs to be ~/.next (distDir), so I rewrite it using the iteratee.

ref. https://docs.sentry.io/platforms/node/sourcemaps/#updating-sentry-sdk-configuration-to-support-source-maps


before

ss2

after

ss1

+16 -0

0 comment

3 changed files

pr created time in 3 months

push eventhokaccha/next.js

Kazuhito Hokamura

commit sha 26380bedd96443939b59d8fcdd4f5216f8fca21a

Update Sentry example to improve display of server errors

view details

push time in 3 months

more