Skip to content

Commit

Permalink
Fix typo migration-from-import.md instead of code-file-loader it shou…
Browse files Browse the repository at this point in the history
…ld be graphql-file-loader (#1593)
  • Loading branch information
Yoanribeiro committed Jun 3, 2020
1 parent e5d23fe commit df3e4cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/docs/migration-from-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: From GraphQL Import
description: Migration from GraphQL Import
---

GraphQL Import was an NPM package that allows you import and export definitions using `#import` syntax in `.graphql` files. So this package has been moved under GraphQL Tools monorepo. It is really easy to migrate. You need two different packages `@graphql-tools/load` and `@graphql-tools/code-file-loader`.
GraphQL Import was an NPM package that allows you import and export definitions using `#import` syntax in `.graphql` files. So this package has been moved under GraphQL Tools monorepo. It is really easy to migrate. You need two different packages `@graphql-tools/load` and `@graphql-tools/graphql-file-loader`.

Before;
```ts
Expand All @@ -22,7 +22,7 @@ const schema = makeExecutableSchema({ typeDefs, resolvers });
After;
```ts
import { loadSchemaSync } from '@graphql-tools/load';
import { GraphQLFileLoader } from '@graphql-tools/code-file-loader';
import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader';
import { addResolversToSchema } from '@graphql-tools/schema';

const schema = loadSchemaSync(join(__dirname, 'schema.graphql'), { loaders: [new GraphQLFileLoader()] });
Expand Down

0 comments on commit df3e4cf

Please sign in to comment.