This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios_.post(apiUrl, { | |
query: queries.getSelectCharacter, | |
variables: { id: '2'} | |
}) | |
.then((res) => { | |
const character = res.data.data.character; | |
console.log(`Personaje seleccionado ID ${character.id} - ${character.name}`) | |
console.log(character) | |
}) | |
.catch((error) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Personaje seleccionado ID 2 - Jesse Pinkman | |
{ id: '2', name: 'Jesse Pinkman', actor: 'Aaron Paul' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graphql-anartz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
? ¿Qué tipo de proyecto quieres generar? (Use arrow keys) | |
❯ graphql-hello-world | |
graphql-hello-world-db | |
graphql-hello-world-with-env | |
graphql-jwt-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
? ¿Qué tipo de proyecto quieres generar? graphql-hello-world | |
? ¿Cuál es el nombre del proyecto? modularize-graphql-schema | |
? Usuario Github mugan86 | |
? Desarrolador - Nombre y Apellidos Anartz Mugika Ledo | |
? Desarrollador - Email mugan86@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modularize-graphql-schema/LICENSE (1071 bytes) | |
CREATE /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modularize-graphql-schema/README.md (57 bytes) | |
CREATE /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modularize-graphql-schema/package.json (1438 bytes) | |
CREATE /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modularize-graphql-schema/src/resolvers/query.ts (479 bytes) | |
CREATE /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modularize-graphql-schema/src/resolvers/resolverMap.ts (152 bytes) | |
CREATE /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modularize-graphql-schema/src/schema/schema.graphql (110 bytes) | |
CREATE /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modularize-graphql-schema/src/schema/schema.ts (325 bytes) | |
CREATE /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modularize-graphql-schema/src/server.ts (992 bytes) | |
CREATE /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modularize-graphql-schema/tsconfig.json (5649 bytes) | |
Instalando las dependencias en /Volumes/DATA/Udemy/Proyects/I+D/GraphQL/modulariz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
hello: String! | |
helloWithName(name: String!): String! | |
helloToGraphQLCourse: String! | |
usuarios: [Usuario] | |
} | |
type Usuario { | |
id: ID | |
nombre: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IResolvers } from "graphql-tools"; | |
// Los resolvers de las operaciones de consulta para devolver información | |
const resolvers: IResolvers = { | |
Query: { | |
hello(): string { | |
return 'Hello world!!'; | |
}, | |
helloWithName(_: void, args: any): string { | |
return `Hello ${args.name}!!`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'graphql-import-node'; | |
import { fileLoader, mergeTypes } from 'merge-graphql-schemas'; | |
import { makeExecutableSchema } from 'graphql-tools'; | |
import { GraphQLSchema } from 'graphql'; | |
import resolvers from '../resolvers/resolverMap'; | |
const typeDefs = mergeTypes(fileLoader(`${__dirname}/**/*.graphql`), { all: true }) | |
const schema: GraphQLSchema = makeExecutableSchema({ | |
typeDefs, | |
resolvers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "watch-file", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "Anartz Mugika Ledo <mugan86@gmail.com>", | |
"license": "MIT" |