Skip to content

Commit

Permalink
Add commented out code for makeMergeSchema
Browse files Browse the repository at this point in the history
Remove unused imports
  • Loading branch information
dac09 committed May 11, 2021
1 parent 4c67031 commit 8037df6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
25 changes: 21 additions & 4 deletions packages/cli/src/commands/generate/types/generate-gql-types.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
import { generate } from '@graphql-codegen/cli'
import chokidar from 'chokidar'

import { getPaths } from 'src/lib'

const { generate } = require('@graphql-codegen/cli')
const chokidar = require('chokidar')
// We'll need this when we try to use makeMergedSchema
// import path from 'path'
// import { makeServices, makeMergedSchema } from '@redwoodjs/api'
// import babelRequireHook from '@babel/register'

// babelRequireHook({
// extends: path.join(getPaths().api.base, '.babelrc.js'),
// extensions: ['.js', '.ts', '.tsx', '.jsx'],
// ignore: ['node_modules'],
// cache: false,
// })

const GENERATOR_CONFIG = {
// @TODO: Can't seem to get the glob imports working
// It would be better to use this, because that way we don't need to run the API server

// schema: makeMergedSchema({
// schemas,
// services: makeServices({ services }),
// schemas: require(`${getPaths().api.base}/src/graphql/**/*.{js,ts}`),
// services: makeServices({
// services: require(`${getPaths().api.base}/src/services/**/*.{js,ts}`),
// }),
// }),
schema: 'http://127.0.0.1:8911/graphql',
config: {
Expand Down
3 changes: 0 additions & 3 deletions packages/cli/src/commands/generate/types/types.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import fs from 'fs'
import path from 'path'

import Listr from 'listr'
import terminalLink from 'terminal-link'

Expand Down

0 comments on commit 8037df6

Please sign in to comment.