# Note to future me -- Adding GraphQL to an app

DevFeed: [Note to future me -- Adding GraphQL to an app](<https://devfeed.tech/articles/note-to-future-me-adding-graphql-to-an-app-32072.md>)

Original publisher: [Read original article](<https://www.maiatoday.net/p/note-to-future-me-adding-graphql-to-an-app/>)

Published: 2018-04-08T21:36:13Z

Content type: tutorial

Language: en

Sources: [maiatoday](<https://devfeed.tech/sources/maiatoday.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [API](<https://devfeed.tech/topics/api.md>), [JSON](<https://devfeed.tech/topics/json.md>), [JSON Schema](<https://devfeed.tech/topics/json-schema.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [json](<https://devfeed.tech/tags/json.md>), [json-schema](<https://devfeed.tech/tags/json-schema.md>), [node](<https://devfeed.tech/tags/node.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [query](<https://devfeed.tech/tags/query.md>), [sample](<https://devfeed.tech/tags/sample.md>)

## AI overview

A practical note on adding GraphQL to an application: install and run a Node service, obtain its schema with Apollo Codegen, add a query and schema to the app, and call the service.

## Source excerpt

Adding the library to the app see commit 03bd7a7534f7a23276fc47c4f7c94d7ac153bc0b plugin dependencies Making a service wrapping and existing endpoint https://github.com/joakin/wikimedia-graphql install node if you don't have it. node -- version running the service `node index.js` play with the service https://gist.github.com/maiatoday/578aebcee3bd9decb6e3c6833c73a4ba#file-wikipage-graphql getting the json.schema https://github.com/apollographql/apollo-codegen cd app/src/main/graphql/net/maiatoday/helloblondie apollo-codegen download-schema http://localhost:3002/graphql -- output schema.json Adding the service to the app adding a query adding the schema a5a47f0ff45f6bc5d5a3aa6f1fee50af363f7893 getting access to the service calling the service Some pointers on query syntax Gitrepo `sudo apollo-codegen introspect-schema https://api.blargh.com/graphql -- header "Authorization: Bearer xxxx" -- output schema.json`