• Version 4.2.7
  • Published
  • 168 kB
  • 3 dependencies
  • MIT license


npm i graphql-anywhere
yarn add graphql-anywhere
pnpm add graphql-anywhere


Run GraphQL queries with no schema and just one resolver



function check

check: (doc: DocumentNode, data: any, variables?: VariableMap) => void;

    function filter

    filter: <FD = any, D extends FD = any>(
    doc: DocumentNode,
    data: D,
    variableValues?: VariableMap
    ) => FD;

      function graphql

      graphql: (
      resolver: Resolver,
      document: DocumentNode,
      rootValue?: any,
      contextValue?: any,
      variableValues?: VariableMap,
      execOptions?: ExecOptions
      ) => any;

        function propType

        propType: (doc: DocumentNode, mapPropsToVariables?: (props: any) => any) => any;

          Type Aliases

          type ExecContext

          type ExecContext = {
          fragmentMap: FragmentMap;
          contextValue: any;
          variableValues: VariableMap;
          resultMapper: ResultMapper;
          resolver: Resolver;
          fragmentMatcher: FragmentMatcher;

            type ExecInfo

            type ExecInfo = {
            isLeaf: boolean;
            resultKey: string;
            directives: DirectiveInfo;
            field: FieldNode;

              type ExecOptions

              type ExecOptions = {
              resultMapper?: ResultMapper;
              fragmentMatcher?: FragmentMatcher;

                type FragmentMatcher

                type FragmentMatcher = (
                rootValue: any,
                typeCondition: string,
                context: any
                ) => boolean;

                  type Resolver

                  type Resolver = (
                  fieldName: string,
                  rootValue: any,
                  args: any,
                  context: any,
                  info: ExecInfo
                  ) => any;

                    type ResultMapper

                    type ResultMapper = (
                    values: {
                    [fieldName: string]: any;
                    rootValue: any
                    ) => any;

                      type VariableMap

                      type VariableMap = {
                      [name: string]: any;

                        Package Files (3)

                        Dependencies (3)

                        Dev Dependencies (0)

                        No dev dependencies.

                        Peer Dependencies (1)


                        To add a badge like this badgeto your package's README, use the codes available below.

                        You may also use to create a custom badge linking to

                        • Markdown
                        • HTML
                          <a href=""><img src="" alt=""></a>