From 9a5bc9d1c17506f4da8f6be4b1ef7c22e080a8dd Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Fri, 20 May 2022 16:29:18 -0700 Subject: [PATCH] Add microfiber to javascript tools section --- .../javascript/tools/microfiber.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/content/code/language-support/javascript/tools/microfiber.md diff --git a/src/content/code/language-support/javascript/tools/microfiber.md b/src/content/code/language-support/javascript/tools/microfiber.md new file mode 100644 index 0000000000..cc5c20a7f0 --- /dev/null +++ b/src/content/code/language-support/javascript/tools/microfiber.md @@ -0,0 +1,33 @@ +--- +name: Microfiber +description: A library to query and manipulate GraphQL Introspection Query results. +url: https://github.com/anvilco/graphql-introspection-tools +github: anvilco/graphql-introspection-tools +npm: "microfiber" +--- + +Microfiber is a JavaScript library that allows: + +* Digging through your Introspection Query Results for a specific Query, Mutation, Type, Field, Argument or Subscription. +* Removing a specific Query, Mutation, Type, Field/InputField, Argument or Subscription from your Introspection Query Results. +* Removing Queries, Mutations, Fields/InputFields or Arguments that refer to Type that does not exist in - or has been removed from - your Introspection Query Results. + +```sh +npm install microfiber +# OR +yarn add microfiber +``` + +Then in JS: + +```js +import { Microfiber } from 'microfiber' + +const introspectionQueryResults = {...} + +const microfiber = new Microfiber(introspectionQueryResults) + +// ...do some things to your schema with `microfiber` + +const cleanedIntrospectonQueryResults = microfiber.getResponse() +```