2024.1.2 • Published 3 months ago

@ioki/transitland-gql-client v2024.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

TransitLand Graphql Client

transitland-logo-light

npm (scoped) size npm (downloads) github test release

About

Since the Transitland released its new and shiny GraphQL API, it is possible to query the API using GraphQL.

The client is being built using GenQL and updated hourly, if there are upstream changes.

Getting Started

First add the library and its peerDependency to your project:

  • npm

    npm i @ioki/transitland-gql-client@latest
  • yarn

    yarn add @ioki/transitland-gql-client@latest

Setup

  1. Get an API key with access to the gql api at transit.land
  2. Create a client instance:
import { createClient } from '@ioki/transitland-gql-client';

const transitlandClient = createClient({
  apiKey: "YOUR_SUPER_SECRET_API_KEY",
  fetch: fetchClient // not needed for browser and node >= v18 (and >=v16 with --experimental-fetch)
});

Usage

GenQL provides a neat converter from GraphQL to TypeScript. So you can actually just test the queries you want to use in the playground.

Mocking

Using GraphQL's strict type definitions, it is pretty easy to generate a mock server you could use during your tests. An extensive example is stored as a test.

License

Distributed under the MIT License. See LICENSE.md for more information.

Contributing (complexity, asc)

  1. join us @ioki and make this one of your projects
  2. create issues and pull requests, we're happy to enhance this

Contact

ioki Mobility - @ioki_mobility

Project Link: https://github.com/ioki-mobility/transitland-gql-client

2024.1.2

3 months ago

2024.1.1

4 months ago

2024.1.0

4 months ago

2023.8.0

8 months ago

2023.7.0

10 months ago

2023.9.2

8 months ago

2023.9.1

8 months ago

2023.9.0

8 months ago

2023.12.0

5 months ago

2023.10.2

6 months ago

2023.10.1

7 months ago

2023.10.0

7 months ago

2023.6.1

11 months ago

2023.6.0

11 months ago

2023.3.33

1 year ago

2023.3.32

1 year ago

2023.3.31

1 year ago

2023.3.30

1 year ago

2023.4.34

1 year ago

2023.4.35

1 year ago

2023.4.33

1 year ago

2023.2.30

1 year ago

2023.4.36

1 year ago

2023.2.29

1 year ago

2022.11.27

2 years ago

2022.11.28

1 year ago

2022.11.29

1 year ago

2022.10.26

2 years ago

2022.10.27

2 years ago

2022.8.25

2 years ago

2022.8.26

2 years ago

2022.9.26

2 years ago

2022.8.24

2 years ago

2022.8.21

2 years ago

2022.6.20

2 years ago

2022.8.20

2 years ago

2022.8.23

2 years ago

2022.8.22

2 years ago

2022.6.19

2 years ago

2022.6.18

2 years ago

2022.7.20

2 years ago

2022.6.17

2 years ago

2022.6.16

2 years ago

2022.6.15

2 years ago

2022.6.14

2 years ago

2022.6.13

2 years ago

2022.6.12

2 years ago

2022.6.11

2 years ago

2022.6.10

2 years ago

2022.6.9

2 years ago

2022.6.8

2 years ago

2022.6.7

2 years ago

2022.6.6

2 years ago

2022.6.5

2 years ago

2022.6.4

2 years ago

2022.6.3

2 years ago