How to use the getIntrospectionQuery function from graphql

Find comprehensive JavaScript graphql.getIntrospectionQuery code examples handpicked from public code repositorys.

1
2
3
4
5
6
7
8
9
10
// https://github.com/NathanRSmith/graphql-visualizer

var _ = require('lodash')
var graphql = require('graphql')

module.exports.query = graphql.getIntrospectionQuery()
module.exports.theme = {
  header: {
    invert: false
  },
fork icon56
star icon683
watch icon14

+ 3 other calls in file

99
100
101
102
103
104
105
106
107
108

console.log(`• Fetching schema from ${url}`)
let introspectionJsonString = await new Promise((resolve, reject) => {
  let body = JSON.stringify({
    operationName: 'IntrospectionQuery',
    query: graphql.getIntrospectionQuery(),
    variables: {}
  })
  headers['Content-Type'] = 'application/json'
  headers['Content-Length'] = body.length
fork icon15
star icon183
watch icon0

8
9
10
11
12
13
14
15
16
17
18
 *
 * @see https://www.graphql-code-generator.com/docs/config-reference/schema-field#custom-schema-loader
 * @see https://gist.github.com/craigbeck/b90915d49fda19d5b2b17ead14dcd6da#gistcomment-3204270
 */
module.exports = async remoteUrl => {
  const introspectionQuery = getIntrospectionQuery();


  if (process.env.VITE_REACT_APP_API_BASE) {
    remoteUrl = `${process.env.VITE_REACT_APP_API_BASE}/graphql`;
  }
fork icon0
star icon3
watch icon0

10
11
12
13
14
15
16
17
18
19
20
21
var getQueryTypes_1 = require("./components/Playground/util/getQueryTypes");


var immutable_1 = require("immutable");


exports.columnWidth = 300;
exports.introspectionQuery = graphql_1.getIntrospectionQuery();
exports.defaultQuery = '# Write your query or mutation here\n';
exports.modalStyle = {
  overlay: {
    zIndex: 99999,
fork icon0
star icon0
watch icon2

+ 4 other calls in file

30
31
32
33
34
35
36
37
38
39
console.info('_____________________________________________________');
console.info('Начинает скачивать схему!');
const token = require('./token.json');
const body = JSON.stringify({
  variables: {},
  query: getIntrospectionQuery(),
});
const response = await superagent
  .post(process.env.VUE_APP_GRAPHQL_ENDPOINT_SCHEMA)
  .send(body)
fork icon0
star icon0
watch icon0

+ 2 other calls in file

23
24
25
26
27
28
29
30
31
32

const { gql, HttpLink, makePromise, execute } = require('apollo-boost');
const { getIntrospectionQuery, introspectionQuery } = require('graphql');

const query = gql(
    getIntrospectionQuery ? getIntrospectionQuery() : introspectionQuery
);

const link = new HttpLink({
    uri: graphQLEndpoint,
fork icon0
star icon0
watch icon0