Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@trycourier/client-graphql
Advanced tools
Courier GraqphQl Client for usage in the browser.
You can initialize each module with either an object containing:
{
clientKey: string;
userId: string;
userSignature?: string,
}
or you can create the client separtly and pass the client in:
import { createCourierClient } from "@trycourier/client-graphql";
const courierClient = createCourierClient({
clientKey: "abc123",
userId: "@me",
userSignature: "SUPER_SECRET",
});
const messages = Messages({ client: courierClient })
const events = Events({ events: courierClient })
const events = Brands({ events: courierClient })
import { Messages } from "@trycourier/client-graphql";
const messagesApi = Messages({
clientKey: "abc123",
userId: "@me",
userSignature: "SUPER_SECRET",
});
const getMessageCount = async (params?: {
isRead?: boolean,
from?: number,
tags?: string[],
}) => {
const messageCount = await messagesApi.getMessageCount(params);
return messageCount;
};
const getMessages = async (
params?: {
isRead?: boolean,
from?: number,
tags?: string[],
},
after?: string
) => {
const { startCursor, messages } = await messagesApi.getMessages(params);
return {
startCursor,
messages,
};
};
import { Events } from "@trycourier/client-graphql";
const eventsApi = Events({
clientKey: "abc123",
userId: "@me",
userSignature: "SUPER_SECRET",
});
const trackEvent = async (trackingId: string) => {
await eventsApi.trackEvent(trackingId);
};
import { Brands } from "@trycourier/client-graphql";
const brandsApi = Brands({
clientKey: "abc123",
userId: "@me",
userSignature: "SUPER_SECRET",
});
const getBrand = async (brandId?: string) => {
const myBrand = await brandsApi.getBrand(brandId);
return myBrand;
};
import { Banner } from "@trycourier/client-graphql";
const bannerApi = Banner({
clientKey: "abc123",
userId: "@me",
userSignature: "SUPER_SECRET", //optional
});
const getBanners = async (params?: { tags?: string[], locale?: string }) => {
const myBanners = await bannerApi.getBanners(params);
return myBanners;
};
import { Banner } from "@trycourier/client-graphql";
const bannerApi = Banner({
clientKey: "abc123",
authorization: "MY JWT TOKEN",
});
const getBanners = async (params?: { tags?: string[], locale?: string }) => {
const myBanners = await bannerApi.getBanners(params);
return myBanners;
};
FAQs
Courier GraqphQl Client for usage in the browser.
The npm package @trycourier/client-graphql receives a total of 26,435 weekly downloads. As such, @trycourier/client-graphql popularity was classified as popular.
We found that @trycourier/client-graphql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.