New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

xyz.mcxross.graphql.client:graphql-multiplatform-client-js

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xyz.mcxross.graphql.client:graphql-multiplatform-client-js

A multiplatform GraphQL client for Kotlin, supporting Android, iOS, macOS, tvOS, watchOS, Linux, Windows, and the web.

  • 0.1.0-beta07
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

GraphQL Kotlin Multiplatform

GraphQL Kotlin Multiplatform is a GraphQL client for Kotlin Multiplatform. It is a multiplatform library that allows you to interact with a GraphQL server from Kotlin code. It is built on top of graphql-kotlin.

Significant changes have been made to the original library to make it work on Kotlin Multiplatform. This included providing Ktor client support for all platforms and utilization of only multiplatform libraries.

Kotlin Version Maven Central badge-android badge-ios badge-js badge-jvm badge-linux badge-macos badge-windows

Table of contents

Features

  • Multiplatform
  • Uses Ktor as the underlying HTTP client
  • Type-safe
  • Client Configurable

Quick Start

Installation

GraphQL Multiplatform is available on Maven Central as a Kotlin Multiplatform library. You can either add it to your multiplatform project as shown below:

commonMain.dependencies {
    implementation("xyz.mcxross.graphql:graphql-multiplatform.client")
}

Then apply the plugin to your project:

plugins {
    id("xyz.mcxross.graphql-multiplatform")
}

:warning: Note: Currently, only Kotlin Multiplatform projects are supported.

Usage

Applying the plugin to your project will generate a graphql block in your build.gradle.kts file. You can configure the client by setting the endpoint and packageName properties.

graphql {
    client {
        endpoint = "https://api.example.com/graphql"
        packageName = "com.example.graphql"
    }
}

The plugin will add a generateClient task to your project. Running this task will generate the client code in the package specified in the packageName property.

./gradlew generateClient

What's included

  • Client - A multiplatform GraphQL client that allows you to interact with a GraphQL server
  • Plugin - A Gradle plugin that generates Kotlin code from your GraphQL schema

Contribution

We welcome contributions to GraphQL Kotlin Multiplatform. Please refer to the contribution guide for more information.

License

Copyright 2024 McXross

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

FAQs

Package last updated on 10 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc