Skip to content

Instantly share code, notes, and snippets.

View newerton's full-sized avatar
🏖️
Working

Newerton newerton

🏖️
Working
View GitHub Profile
@arifmahmudrana
arifmahmudrana / joi-locale.ts
Created January 21, 2020 13:05
joi localization internationalization error messages
import { object, string, number, ValidationError } from '@hapi/joi';
const schema = object({
searchCode: string()
.required()
.label('Search code'),
id: number().required()
}),
messages = {
'alternatives.all': '{{#label}} does not match all of the required types',
@franciscojsc
franciscojsc / Kind.md
Last active February 27, 2024 10:56
Kind, crie seu cluster Kubernetes localmente com Docker
import { RemoteGraphQLDataSource } from '@apollo/gateway';
import { fetch, Request, Headers } from 'apollo-server-env';
import { isObject } from '@apollo/gateway/dist/utilities/predicates';
import FormData from 'form-data';
import _ from 'lodash';
export default class FileUploadDataSource extends RemoteGraphQLDataSource {
async process(args) {
const { request, context } = args;