graphile-pgvector

Expose pgvector vector columns as a GraphQL scalar with similarity search queries.

1|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/constructive-io/constructive-skills --skill graphile-pgvector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphile-pgvector
Source: https://github.com/constructive-io/constructive-skills/tree/main/skills/graphile-pgvector
Command: npx skills add https://github.com/constructive-io/constructive-skills --skill graphile-pgvector

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables seamless integration of the pgvector extension with PostGraphile v5, allowing you to expose vector embeddings and perform similarity searches directly within your GraphQL API.

Core Features & Use Cases

  • GraphQL Scalar for Vectors: Surfaces vector(n) columns as a Vector GraphQL scalar type.
  • Vector Search Fields: Automatically generates GraphQL query fields for similarity searches (cosine, L2, inner product).
  • Use Case: Building an AI-powered search feature for your application where users can find semantically similar documents or products based on their embeddings.

Quick Start

Use the graphile-pgvector skill to expose vector search capabilities for the 'documents' table in your GraphQL API.

Frequently Asked Questions about graphile-pgvector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose pgvector embeddings through a GraphQL API?

To expose pgvector embeddings through a GraphQL API, this integration surfaces vector(n) columns as a Vector GraphQL scalar type. It automatically integrates the pgvector extension with PostGraphile v5 to handle vector data.

Does PostGraphile v5 support vector similarity search queries?

Yes, PostGraphile v5 supports vector similarity search queries when integrated with this Skill. It automatically generates GraphQL query fields for similarity searches using cosine, L2, and inner product distance metrics.

What is needed to perform semantic search with pgvector and PostGraphile?

To perform semantic search with pgvector and PostGraphile, you need PostGraphile v5, Grafast, and graphile-build-pg. These dependencies are required for schema generation and proper vector type handling.

Can I use Grafast to build AI-powered search features with vector embeddings?

Yes, you can use Grafast to build AI-powered search features with vector embeddings. This integration enables semantic retrieval by generating GraphQL query fields that find similar documents based on their embeddings.

What GraphQL scalar type is used for pgvector columns?

The GraphQL scalar type used for pgvector columns is the Vector type. This Skill surfaces vector(n) database columns directly as a Vector scalar within your generated GraphQL API schema.

How do I add cosine similarity search fields to a PostGraphile schema?

To add cosine similarity search fields to a PostGraphile schema, apply this Skill to automatically generate the necessary query fields. It supports cosine, L2 distance, and inner product metrics for similarity matching.