{"id":47788,"library":"gql-sdl","title":"gql-sdl","description":"CLI tool for downloading GraphQL schemas (SDL or JSON) from remote endpoints via introspection. Version 1.1.0 is the current stable release; the tool is simple, single-purpose, and actively maintained. Unlike alternatives (e.g., graphql-cli, get-graphql-schema), gql-sdl does not require a full workflow setup and works out of the box with `npx`. It supports custom headers, output to file, and introspection options from GraphQL.js. Written in TypeScript and ships type definitions.","status":"active","version":"1.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/jkmartindale/gql-sdl","tags":["javascript","cli","graphql","typescript"],"install":[{"cmd":"npm install gql-sdl","lang":"bash","label":"npm"},{"cmd":"yarn add gql-sdl","lang":"bash","label":"yarn"},{"cmd":"pnpm add gql-sdl","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package is primarily used as a CLI tool. It can be run with npx or installed globally.","symbol":"gql-sdl","correct":"npx gql-sdl https://example.com/graphql"}],"quickstart":{"code":"npx gql-sdl https://swapi-graphql.netlify.app/.netlify/functions/index -o schema.graphql","lang":"typescript","description":"Downloads the GraphQL schema in SDL format from the Star Wars API and saves to schema.graphql."},"warnings":[{"fix":"Omit unsupported flags or check server compatibility.","message":"The introspection options (--specified-by-url, --input-value-deprecation, etc.) may not be supported by all GraphQL servers and can cause the query to fail.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use -o FILE to specify a base filename when outputting both formats.","message":"Both --sdl and --json flags can be used together; output file base name is required in that case.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Redirect output to file using -o or shell redirection.","message":"Running without -o flag prints to stdout; large schemas may clutter terminal.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.1.0':19 'activ':33 'altern':36 'box':60 'cli':4,40,83 'current':22 'custom':65 'definit':81 'download':7 'e.g':37 'endpoint':15 'file':69 'full':52 'get':42 'get-graphql-schema':41 'gql':2,46 'gql-sdl':1,45 'graphql':8,39,43,84 'graphql-c':38 'graphql.js':74 'header':66 'introspect':17,71 'javascript':82 'json':12 'maintain':34 'npx':62 'option':72 'output':67 'purpos':31 'releas':24 'remot':14 'requir':50 'schema':9,44 'sdl':3,10,47 'setup':54 'ship':79 'simpl':28 'singl':30 'single-purpos':29 'stabl':23 'support':64 'tool':5,26 'type':80 'typescript':77,85 'unlik':35 'version':18 'via':16 'work':56 'workflow':53 'written':75","created_at":"2026-06-07T16:53:18.838288+00:00","updated_at":"2026-06-07T16:53:18.838288+00:00","problems":[{"fix":"Add a header with authentication: -H 'Authorization: Bearer YOUR_TOKEN'","cause":"The GraphQL endpoint requires authentication (e.g., GitHub API) but no Authorization header was provided.","error":"Error response from server: [401] Unauthorized"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/jkmartindale/gql-sdl#readme","github":"https://github.com/jkmartindale/gql-sdl","docs":null,"changelog":null,"pypi":null,"npm":"gql-sdl","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}