npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@zeroin.earth/appwrite-graphql

v0.16.5

Published

Appwrite Graphql library, utilizing @tanstack/react-query and inspired by react-appwrite

Readme

Appwrite GraphQL

This is a GraphQL library for Appwrite, built with the power of @tanstack/react-query and inspired by react-appwrite.

Installation

npm install --save @zeroin.earth/appwrite-graphql

yarn add @zeroin.earth/appwrite-graphql

Usage

Set up

You must provide the Appwrite URL and Project ID as environment variables. It does not matter how they are provided as long as they can be accessed from process.env.:

/* Endpoint - Pick one */
APPWRITE_ENDPOINT=
NEXT_PUBLIC_APPWRITE_URL=
EXPO_PUBLIC_APPWRITE_URL=

/* Project ID - Pick one */
APPWRITE_PROJECT_ID=
NEXT_PUBLIC_APPWRITE_PROJECT_ID
EXPO_PUBLIC_APPWRITE_PROJECT_ID

Provider

If you need to provide a custom endpoint and project ID, and can't use one of the above environment variables, you may override the default variables using the <AppwriteProvider>:

<AppwriteProvider endpoint="https://api.example.com/v1" projectId="jhkeri4889dfg7fg78f7g">
  <App />
</AppwriteProvider>

Hooks

import { useLogin } from "@zeroin.earth/appwrite-graphql";

export function LogIn() {
  const router = useRouter();
  const { login, oAuthLogin } = useLogin();

  const onSubmit: SubmitHandler<Inputs> = async (data) => {
    await login.mutateAsync(data, {
      onSuccess: () => {
        router.push("/profile");
      },
    });
  };

  const loginWithGoogle = () => {
    oAuthLogin.mutate({
      provider: "google",
      success: 'successUrl',
      failure: 'failureUrl',
    });
  };
}
import { useFunction } from "@zeroin.earth/appwrite-graphql";

export function Form() {
  const { executeFunction } = useFunction();

  const onSubmit: SubmitHandler<Input> = async (data) => {
    executeFunction.mutate(
      {
        functionId: '6gibhbyy6tggdf',
        body: {
          message: {
            ...data,
          },
        },
      },
      {
        onSettled: () => {
          setJustSignedUp(true);
        },
      },
    );
  };
}

Using Fragments

import {
  fragments,
  getFragmentData,
  useAccount,
} from "@zeroin.earth/appwrite-graphql";

export function Profile() {
  const { data, isLoading } = useAccount({});
  const account = getFragmentData(fragments.Account_UserFragment, data);

  return (
    <div>
      {data && (
        <h2>{`Welcome, ${account?.name ?? "Visitor"}!`}</h2>
      )}
    </div>
  );
}

Work in progress

We are working on matching parity with the current Appwrite SDK. After we do so, version numbers will match the currently supported version of the SDK. Until then, please feel free to use what we have finished so far!

Still left to do:

Account ✔️

  • [x] Get account
  • [x] Create account
  • [x] Update email
  • [x] List Identities
  • [x] Delete Identity
  • [x] Create JWT
  • [x] List logs
  • [x] Update name
  • [x] Update password
  • [x] Update phone
  • [x] Get account preferences
  • [x] Update preferences
  • [x] Create password recovery
  • [x] Create password recovery (confirmation)
  • [x] List sessions
  • [x] Delete sessions
  • [x] Create anonymous session
  • [x] Create email session
  • [x] Create magic URL session
  • [x] Create magic URL session (confirmation)
  • [x] Create phone session
  • [x] Create phone session (confirmation)
  • [x] Get session
  • [x] Update OAuth session (refresh tokens)
  • [x] Delete session
  • [x] Create email verification
  • [x] Create email verification (confirmation)
  • [x] Create phone verification
  • [x] Create phone verification (confirmation)

Teams

  • [ ] List teams
  • [ ] Create team
  • [ ] Get team
  • [ ] Update name
  • [ ] Delete team
  • [ ] List team memberships
  • [ ] Create team membership
  • [ ] Get team membership
  • [ ] Update membership
  • [ ] Delete team membership
  • [ ] Update team membership status
  • [ ] Get team preferences
  • [ ] Update preferences

Databases ✔️

  • [X] List documents
  • [X] Create document
  • [X] Get document
  • [x] Update document
  • [x] Delete document

Storage

  • [ ] List files
  • [ ] Create file
  • [ ] Get file
  • [ ] Update file
  • [ ] Delete File
  • [ ] Get file for download
  • [ ] Get file preview
  • [ ] Get file for view

Functions ✔️

  • [X] Create execution
  • [X] Get execution

Locale

  • [ ] Get user locale
  • [ ] List Locale Codes
  • [ ] List continents
  • [ ] List countries
  • [ ] List EU countries
  • [ ] List countries phone codes
  • [ ] List currencies
  • [ ] List languages

Avatars

  • [ ] Get browser icon
  • [ ] Get credit card icon
  • [ ] Get favicon
  • [ ] Get country flag
  • [ ] Get image from URL
  • [ ] Get user initials
  • [ ] Get QR code