Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

build: fetch GQL schema from endpoint #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ Click reload for Sourcegraph at `about:debugging`
- Download the `ngrok` executable https://dashboard.ngrok.com/get-started, authenticate, and run `./ngrok localhost 3080`
- Visit the URL it spits out, sign in, and add the URL to your Safari extension (to the left of the address bar - don't change Settings in the Extension Builder)

### Updating GraphQL types

`npm run graphql` fetches the schema from the live GraphQL API and updates app/backend/graphqlschema.ts.

## Testing

Coming soon...
Expand Down
2 changes: 1 addition & 1 deletion app/backend/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { IQuery } from '@sourcegraph/extensions-client-common/lib/schema/graphql
import { Observable, throwError } from 'rxjs'
import { ajax } from 'rxjs/ajax'
import { catchError, map } from 'rxjs/operators'
import { GQL } from '../../types/gqlschema'
import { isPrivateRepository, repoUrlCache, sourcegraphUrl } from '../util/context'
import { RequestContext } from './context'
import { AuthRequiredError, createAuthRequiredError, NoSourcegraphURLError } from './errors'
import * as GQL from './graphqlschema'
import { getHeaders } from './headers'

/**
Expand Down
Loading