diff --git a/.changeset/shy-planets-drum.md b/.changeset/shy-planets-drum.md new file mode 100644 index 0000000..b6389ce --- /dev/null +++ b/.changeset/shy-planets-drum.md @@ -0,0 +1,5 @@ +--- +'graphql-no-alias': patch +--- + +Update docs diff --git a/README.md b/README.md index f90b8fe..ea88f5b 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ npm i graphql-no-alias There are two ways to use this validation: - Using the `directive` in the `schema` -- [Using the configuration options](#Imperative-configuration) +- [Using the configuration options](#Imperative-configuration)(better performance) ### Using the directive @@ -192,6 +192,7 @@ const schema = buildSchema(` ### Imperative configuration With imperative configuration, there is no need for type definition and schema modification. +This results in better performance since the `schema` is not analized (not looking for directives). ```ts const permissions = { diff --git a/src/index.ts b/src/index.ts index 6c09de3..8f86191 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,7 +27,7 @@ export type Config = { /** * Creates validation * @param config - {@link Config} - * @returns validation + * @returns validation function */ export default function createValidation(config?: Config): { typeDefs: string