Full Code of hyperfuse/micro-graphql for AI

master 587183a6a839 cached
13 files
3.5 KB
1.3k tokens
5 symbols
1 requests
Download .txt
Repository: hyperfuse/micro-graphql
Branch: master
Commit: 587183a6a839
Files: 13
Total size: 3.5 KB

Directory structure:
gitextract_zhurid15/

├── .babelrc
├── .flowconfig
├── .gitignore
├── README.md
├── package.json
├── src/
│   ├── index.js
│   ├── mutations/
│   │   ├── createKnock.js
│   │   └── mutation.js
│   ├── queries/
│   │   ├── Knock.js
│   │   └── query.js
│   ├── schema/
│   │   └── schema.js
│   └── types/
│       └── KnockType.js
└── webpack.config.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .babelrc
================================================
{
  "presets": [
    ["es2015", {"modules": false}],
  ],
  "plugins": [
    "transform-flow-strip-types",
  ]
}


================================================
FILE: .flowconfig
================================================
[ignore]

[include]

[libs]

[options]


================================================
FILE: .gitignore
================================================
node_modules
.DS_Store
/dist
dist
flow-typed


================================================
FILE: README.md
================================================
# micro-graphql
> Repo meant to be cloned for our GraphQL microservices

### Usage
+ Clone the repository
  ```bash
  git clone https://github.com/hyperfuse/micro-graphql.git
  ```

+ Install the dependencies
  ```bash
  yarn
  ```

+ Start the microservice
  ```bash
  yarn start
  ```

+ Make it your own!



### License
MIT


================================================
FILE: package.json
================================================
{
  "name": "micro-graphql",
  "version": "0.0.0",
  "description": "micro-graphql",
  "main": "dist/bundle.js",
  "scripts": {
    "start": "yarn run build && micro dist/bundle.js",
    "build": "webpack",
    "watch": "webpack -w"
  },
  "repository": "https://github.com/hyperfuse/micro-graphql.git",
  "author": "Kennet Postigo",
  "license": "MIT",
  "dependencies": {
    "express-graphql": "^0.6.1",
    "graphql": "^0.8.2",
    "micro": "^6.2.0",
    "micro-compress": "^1.0.0"
  },
  "devDependencies": {
    "babel-core": "^6.21.0",
    "babel-loader": "^6.2.10",
    "babel-plugin-transform-flow-strip-types": "^6.21.0",
    "babel-preset-es2015": "^6.18.0",
    "flow-bin": "^0.37.4",
    "webpack": "2.2.0-rc.7"
  }
}


================================================
FILE: src/index.js
================================================
import micro from 'micro';
import graphqlHTTP from 'express-graphql';
import Schema from './schema/schema.js';

exports.default = graphqlHTTP({ schema: Schema, pretty: true, graphiql: true });


================================================
FILE: src/mutations/createKnock.js
================================================
import { GraphQLString, GraphQLBoolean } from 'graphql';
import Knock from './../types/KnockType.js';

const CreateKnock = {
  type: Knock,
  args: { isHome: { type: GraphQLBoolean } },
  resolve(root, args, context) {
    return 'Walking to the door!';
  },
};

export default CreateKnock;


================================================
FILE: src/mutations/mutation.js
================================================
import { GraphQLObjectType } from 'graphql';
import CreateKnock from './createKnock.js';

const Mutation = new GraphQLObjectType({
  name: 'Mutation',
  description: 'Your Root Mutation',
  fields() {
    return { CreateKnock };
  },
});

export default Mutation;


================================================
FILE: src/queries/Knock.js
================================================
import { GraphQLString } from 'graphql';
import Knock from './../types/KnockType.js';

const knockknock = {
  type: Knock,
  args: { knock: { type: GraphQLString } },
  resolve() {
    return 'Waddup fam!';
  },
};

export default knockknock;


================================================
FILE: src/queries/query.js
================================================
import { GraphQLObjectType } from 'graphql';
import knockknock from './Knock.js';

const Query = new GraphQLObjectType({
  name: 'Query',
  description: 'Your Root Query',
  fields() {
    return { knockknock };
  },
});

export default Query;


================================================
FILE: src/schema/schema.js
================================================
import { GraphQLSchema } from 'graphql';
import Query from './../queries/query.js';
import Mutation from './../mutations/mutation.js';

const Schema = new GraphQLSchema({ query: Query, mutation: Mutation });

export default Schema;


================================================
FILE: src/types/KnockType.js
================================================
import { GraphQLObjectType, GraphQLString } from 'graphql';

const Knock = new GraphQLObjectType({
  name: 'Knock',
  description: 'KnockKnock to say hello.',
  fields() {
    return {
      knock: {
        type: GraphQLString,
        resolve(knock) {
          return knock;
        },
      },
    };
  },
});

export default Knock;


================================================
FILE: webpack.config.js
================================================
var path = require('path');
var webpack = require('webpack');

module.exports = {
  devtool: 'inline-source-map',
  entry: [
    './src/index',
  ],
  output: {
    path: path.join(__dirname, 'dist'),
    filename: 'bundle.js',
  },
  plugins: [
    new webpack.NamedModulesPlugin(),
    new webpack.NoEmitOnErrorsPlugin(),
  ],
  module: {
    rules: [
      {
        test: /\.js?$/,
        use: [ 'babel-loader' ],
        include: path.join(__dirname, 'src'),
      },
    ],
  },
};
Download .txt
gitextract_zhurid15/

├── .babelrc
├── .flowconfig
├── .gitignore
├── README.md
├── package.json
├── src/
│   ├── index.js
│   ├── mutations/
│   │   ├── createKnock.js
│   │   └── mutation.js
│   ├── queries/
│   │   ├── Knock.js
│   │   └── query.js
│   ├── schema/
│   │   └── schema.js
│   └── types/
│       └── KnockType.js
└── webpack.config.js
Download .txt
SYMBOL INDEX (5 symbols across 5 files)

FILE: src/mutations/createKnock.js
  method resolve (line 7) | resolve(root, args, context) {

FILE: src/mutations/mutation.js
  method fields (line 7) | fields() {

FILE: src/queries/Knock.js
  method resolve (line 7) | resolve() {

FILE: src/queries/query.js
  method fields (line 7) | fields() {

FILE: src/types/KnockType.js
  method fields (line 6) | fields() {
Condensed preview — 13 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4K chars).
[
  {
    "path": ".babelrc",
    "chars": 113,
    "preview": "{\n  \"presets\": [\n    [\"es2015\", {\"modules\": false}],\n  ],\n  \"plugins\": [\n    \"transform-flow-strip-types\",\n  ]\n}\n"
  },
  {
    "path": ".flowconfig",
    "chars": 39,
    "preview": "[ignore]\n\n[include]\n\n[libs]\n\n[options]\n"
  },
  {
    "path": ".gitignore",
    "chars": 45,
    "preview": "node_modules\n.DS_Store\n/dist\ndist\nflow-typed\n"
  },
  {
    "path": "README.md",
    "chars": 327,
    "preview": "# micro-graphql\n> Repo meant to be cloned for our GraphQL microservices\n\n### Usage\n+ Clone the repository\n  ```bash\n  gi"
  },
  {
    "path": "package.json",
    "chars": 731,
    "preview": "{\n  \"name\": \"micro-graphql\",\n  \"version\": \"0.0.0\",\n  \"description\": \"micro-graphql\",\n  \"main\": \"dist/bundle.js\",\n  \"scri"
  },
  {
    "path": "src/index.js",
    "chars": 193,
    "preview": "import micro from 'micro';\nimport graphqlHTTP from 'express-graphql';\nimport Schema from './schema/schema.js';\n\nexports."
  },
  {
    "path": "src/mutations/createKnock.js",
    "chars": 291,
    "preview": "import { GraphQLString, GraphQLBoolean } from 'graphql';\nimport Knock from './../types/KnockType.js';\n\nconst CreateKnock"
  },
  {
    "path": "src/mutations/mutation.js",
    "chars": 264,
    "preview": "import { GraphQLObjectType } from 'graphql';\nimport CreateKnock from './createKnock.js';\n\nconst Mutation = new GraphQLOb"
  },
  {
    "path": "src/queries/Knock.js",
    "chars": 243,
    "preview": "import { GraphQLString } from 'graphql';\nimport Knock from './../types/KnockType.js';\n\nconst knockknock = {\n  type: Knoc"
  },
  {
    "path": "src/queries/query.js",
    "chars": 244,
    "preview": "import { GraphQLObjectType } from 'graphql';\nimport knockknock from './Knock.js';\n\nconst Query = new GraphQLObjectType({"
  },
  {
    "path": "src/schema/schema.js",
    "chars": 232,
    "preview": "import { GraphQLSchema } from 'graphql';\nimport Query from './../queries/query.js';\nimport Mutation from './../mutations"
  },
  {
    "path": "src/types/KnockType.js",
    "chars": 337,
    "preview": "import { GraphQLObjectType, GraphQLString } from 'graphql';\n\nconst Knock = new GraphQLObjectType({\n  name: 'Knock',\n  de"
  },
  {
    "path": "webpack.config.js",
    "chars": 489,
    "preview": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n  devtool: 'inline-source-map',\n  entr"
  }
]

About this extraction

This page contains the full source code of the hyperfuse/micro-graphql GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 13 files (3.5 KB), approximately 1.3k tokens, and a symbol index with 5 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!