Skip to content

Commit 7c6b28e

Browse files
authored
Documenting duplicate typeDefs with processImport (#4064)
* Added documentation for processimport * Added doc for loadTypedefs * Added changeset
1 parent 6ce24fb commit 7c6b28e

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.changeset/shy-poems-tell.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@graphql-tools/import': patch
3+
'@graphql-tools/load': patch
4+
---
5+
6+
Changes to the documentation regarding processImport

packages/import/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export type VisitedFilesMap = Map<string, Map<string, Set<DefinitionNode>>>;
6464
/**
6565
* Loads the GraphQL document and recursively resolves all the imports
6666
* and copies them into the final document.
67+
* processImport does not merge the typeDefs as designed ( https://github.com/ardatan/graphql-tools/issues/2980#issuecomment-1003692728 )
6768
*/
6869
export function processImport(
6970
filePath: string,

packages/load/src/load-typedefs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export type UnnormalizedTypeDefPointer = { [key: string]: any } | string;
2121
* Asynchronously loads any GraphQL documents (i.e. executable documents like
2222
* operations and fragments as well as type system definitions) from the
2323
* provided pointers.
24+
* loadTypedefs does not merge the typeDefs when `#import` is used ( https://github.com/ardatan/graphql-tools/issues/2980#issuecomment-1003692728 )
2425
* @param pointerOrPointers Pointers to the sources to load the documents from
2526
* @param options Additional options
2627
*/

0 commit comments

Comments
 (0)