These are the GraphQL queries and mutations for the YouTube course.
{
clients {
name
}
Análise | |
Seu código apresenta muitos erros e não condiz com o que é proposto na pergunta, o que pode ser definido em passos: | |
1. Coletar os dados | |
2. Embaralhar os dados | |
3. Exibir os dados | |
O primeiro passo seu código conseguiu concluir com êxito, mas os dois últimos não. A função gerar(fim) não possui utilidade. Houve desatenção entre o declarar e o utilizar da variável k. |
const path = require('path'); | |
module.exports = { | |
config: path.resolve('src', 'database', 'config', 'config.js'), | |
'models-path': path.resolve('src', 'database', 'models'), | |
'seeders-path': path.resolve('src', 'database', 'seeders'), | |
'migrations-path': path.resolve('src', 'database', 'migrations'), | |
}; |
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
# Initialization code that may require console input (password prompts, [y/n] | |
# confirmations, etc.) must go above this block; everything else may go below. | |
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
fi | |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH |
{ | |
"compilerOptions": { | |
"target": "es2018", | |
"lib": [ | |
"es5", | |
"es6", | |
"ES2018" | |
], | |
"experimentalDecorators": true, | |
"emitDecoratorMetadata": true, |
{ | |
"emmet.syntaxProfiles": { | |
"javascript": "jsx" | |
}, | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.fontSize": 16, | |
"javascript.suggest.autoImports": true, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.rulers": [ | |
80, |
{ | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"editor.fontSize": 16, | |
"workbench.colorTheme": "Omni", | |
"editor.rulers": [80, 100], | |
// "editor.formatOnPaste": true, | |
"editor.formatOnSave": true, | |
"editor.tabSize": 2, | |
"[typescriptreact]": { |
import { Injectable } from '@nestjs/common'; | |
import { PrismaService } from '../database/prisma/prisma.service'; | |
import { UpdateDailyMovementDto } from './dto/update-daily_movement.dto'; | |
import { CreateDailyMovementDto } from './dto/create-daily_movement.dto'; | |
@Injectable() | |
export class DailyMovementsService { | |
constructor(private prisma: PrismaService) {} | |
async create(createDailyMovementDto: CreateDailyMovementDto) { | |
const initialDate = new Date(createDailyMovementDto.initialDate); |
export function ValidaCNPJ(cnpj: string): boolean { | |
const b: number[] = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]; | |
const c: string = cnpj.replace(/[^\d]/g, ''); | |
if (c.length !== 14) { | |
return false; | |
} | |
if (/0{14}/.test(c)) { | |
return false; |
function validaCNPJ (cnpj) { | |
var b = [ 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2 ] | |
var c = String(cnpj).replace(/[^\d]/g, '') | |
if(c.length !== 14) | |
return false | |
if(/0{14}/.test(c)) | |
return false |