GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • API
  • API Overview
  • API calls within Gadget
  • Record
  • BackgroundActionHandle
  • Internal vs Public API
  • Sorting, filtering, and searching
  • Errors
  • session
  • task
  • user
  • Global actions
  • Docs
  • Guides

This view

  • Original page
  • New address

GeezerVison is showing docs.gadget.dev — External API calls with Gadget - example-app Docs - Gadget

External API calls 

Using the API client 

The Gadget API client package is a powerful tool that allows your external frontend to communicate with the Gadget backend. It is auto-generated based on the models you create in your application. This API is publicly accessible and supports reading and writing groups of related records. It also includes permission controls and allows for custom problem-specific endpoints.

You only need to install the API client package if you choose not to use the Gadget hosted frontend

Installing

Gadget provides an API client package that supports both Javascript and Typescript. Import the client, use it in browser and/or server-side JavaScript environments like Node.js.

Authentication

The API uses GraphQL over HTTPS, supporting various client options, including Gadget's JavaScript client for automatic authentication.

Raw requests to the GraphQL endpoint 

example-app uses GraphQL as a high performance API query language. GraphQL gives developers a straightforward way of asking for specific data from the API across the whole graph of related models for an application.

You can interact with the GraphQL API through various methods other than using the API client if you prefer to do so, including utilizing the fetch function for direct API access, making requests from the command line using cURL, and more.

It's important to note that while you can make raw reads and writes, Gadget generally recommends client-side data access for your applications. This is because client-side data access is faster for the user, as their browser isn't making extra requests to a server-side process that then makes requests to a Gadget API.

GraphQL

Learn how to use and make requests with various methods to Gadgets GraphQL API.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.