{"library":"graphql-union-input-type","type":"library","category":null,"description":"Provides a GraphQL union input type for graphql-js, enabling mutations to accept polymorphic input via a single field with type discrimination. Version 0.4.0 is the latest stable release; the package has minimal maintenance. It works by wrapping multiple GraphQLInputObjectType definitions and resolving the concrete type based on a key field, a resolveType function, or AST/value inspection. Unlike core GraphQL, which forbids unions/interfaces on input types, this library allows flexible mutation inputs without manual AST traversal, but requires careful handling of typeKey or resolveType to avoid validation errors.","language":"javascript","status":"maintenance","version":"0.4.0","tags":["javascript","graphql","union","interface","input","type"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install graphql-union-input-type","imports":["import UnionInputType from 'graphql-union-input-type'","const UnionInputType = require('graphql-union-input-type')","const MyUnionInput = UnionInputType({ ... })"]},{"cmd":"yarn add graphql-union-input-type","imports":[]},{"cmd":"pnpm add graphql-union-input-type","imports":[]}],"homepage":"https://github.com/Cardinal90/graphql-union-input-type","github":"https://github.com/Cardinal90/graphql-union-input-type","docs":null,"changelog":null,"pypi":null,"npm":"graphql-union-input-type","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}