graphql-hashid-type
A scalar type for GraphQL that obscures your database identifiers using Hashids.
Installation
Use yarn or npm:
$ yarn add graphql-hashid-type
$ npm i -S graphql-hashid-type
Usage
;; const GraphQLHashId = 'super secret salt'; const FoodType = name: 'Food' description: 'A possibly tasty thing' fields: id: type: GraphQLHashId name: type: GraphQLString ; const food = id: 1 name: 'Pizza' id: 2 name: 'Hamburger' id: 3 name: 'Burrito' ; const RootType = name: 'RootType' fields: food: type: FoodType food favorite: type: FoodType args: id: type: GraphQLHashId { return food; } ; ;