Skip to content

Commit

Permalink
Merge branch 'master' into feature-stricter-types
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifeora Okechukwu committed Feb 28, 2021
2 parents 43e1006 + 182f933 commit 5c96f5a
Show file tree
Hide file tree
Showing 85 changed files with 9,259 additions and 17,130 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Link checker

on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 0 1 * *"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Link checker
id: lc
# You may pin to the exact commit or the version.
# uses: peter-evans/link-checker@41c97244bb50a4a1b273d60abf5b5862b09f0c2d
uses: peter-evans/[email protected]
with:
args: -r -v *.md packages/openapi-to-graphql/*.md packages/openapi-to-graphql/test/*.md packages/openapi-to-graphql-cli/*.md

- name: Create issue from file
uses: peter-evans/create-issue-from-file@v2
with:
title: Link checker report
content-filepath: ./link-checker/out.md
labels: report, automated issue
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
sudo: false
language: node_js
node_js:
- "10"
Expand All @@ -8,6 +7,8 @@ os:
- linux
- osx

dist: xenial

install:
- npm install
- npm i -g typescript jest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Here are some guides to further help you get started:
<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/data-centric.png" alt="Example of data-centric design" width="600">

- **Nested data**
[Links](https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.0.md#link-Object) defined in the OAS are used to create nested data structures, allowing for (deeply) nested queries.
[Links](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#linkObject) defined in the OAS are used to create nested data structures, allowing for (deeply) nested queries.

<img src="https://raw.githubusercontent.com/ibm/openapi-to-graphql/master/docs/links.png" alt="Example of links resolution" width="600">

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/watson.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ The following code shows all that's needed to create and run a GraphQL wrapper a

```javascript
const express = require('express')
const graphqlHTTP = require('express-graphql')
const OTG = require('openapi-to-graphql')
const { graphqlHTTP } = require('express-graphql')
const OtG = require('openapi-to-graphql')
const bodyParser = require('body-parser')

async function startServer () {
// use OpenAPI-to-GraphQL to create a GraphQL schema:
const oas = require('path/to/language-translator-v2.json')
const {schema} = await OTG.createGraphQLSchema(oas)
const {schema} = await OtG.createGraphQLSchema(oas)

// setup Express.js app and serve the schema:
const app = express()
Expand Down
Loading

0 comments on commit 5c96f5a

Please sign in to comment.