Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick fix schema #1034

Merged
merged 6 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/client/src/actions/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type {
CreateGroupRequest,
CreateGroupResult,
Group,
GroupMember,
GroupMembersRequest,
GroupRequest,
GroupStatsRequest,
Expand All @@ -24,7 +25,6 @@ import {
} from '@lens-protocol/graphql';
import type { ResultAsync } from '@lens-protocol/types';

import type { Account } from '@lens-protocol/graphql';
import type { AnyClient, SessionClient } from '../clients';
import type { UnauthenticatedError, UnexpectedError } from '../errors';

Expand Down Expand Up @@ -140,7 +140,7 @@ export function fetchGroups(
export function fetchGroupMembers(
client: AnyClient,
request: GroupMembersRequest,
): ResultAsync<Paginated<Account>, UnexpectedError> {
): ResultAsync<Paginated<GroupMember>, UnexpectedError> {
return client.query(GroupMembersQuery, { request });
}

Expand Down
14 changes: 7 additions & 7 deletions packages/client/src/actions/namespace.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type {
CreateUsernameNamespaceRequest,
CreateUsernameNamespaceResult,
NamespaceRequest,
NamespacesRequest,
Paginated,
UsernameNamespace,
UsernameNamespaceRequest,
} from '@lens-protocol/graphql';
import {
CreateUsernameNamespaceMutation,
NamespaceQuery,
NamespacesQuery,
UsernameNamespaceQuery,
} from '@lens-protocol/graphql';
import type { ResultAsync } from '@lens-protocol/types';

Expand Down Expand Up @@ -38,10 +38,10 @@ export function createUsernameNamespace(
}

/**
* Fetch a UsernameNamespace.
* Fetch a Namespace.
*
* ```ts
* const result = await fetchUsernameNamespace(anyClient, {
* const result = await fetchNamespace(anyClient, {
* namespace: evmAddress('0xe2f2a5C287993345a840db3B0845fbc70f5935a5'),
* });
* ```
Expand All @@ -50,11 +50,11 @@ export function createUsernameNamespace(
* @param request - The query request.
* @returns The UsernameNamespace or `null` if it does not exist.
*/
export function fetchUsernameNamespace(
export function fetchNamespace(
client: AnyClient,
request: UsernameNamespaceRequest,
request: NamespaceRequest,
): ResultAsync<UsernameNamespace | null, UnexpectedError> {
return client.query(UsernameNamespaceQuery, { request });
return client.query(NamespaceQuery, { request });
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/actions/notifications.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { describe, it } from 'vitest';
import { loginAsAccountOwner } from '../../testing-utils';
import { fetchNotifications } from './notifications';

describe(`Given the '${fetchNotifications.name}' action`, () => {
describe.skip(`Given the '${fetchNotifications.name}' action`, () => {
describe('When invoked', () => {
it('Then it should not fail w/ a GQL BadRequest error', async () => {
const result = await loginAsAccountOwner().andThen(fetchNotifications);
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build": "tsup",
"check": "gql.tada check",
"doctor": "gql.tada doctor",
"gql:genereate:cache": "gql.tada generate turbo",
"gql:generate:cache": "gql.tada generate turbo",
"gql:download:local": "gql-tada generate schema 'http://localhost:3000/graphql' --output './schema.graphql'",
"gql:download:staging": "gql-tada generate schema 'https://api.staging.lens.dev/graphql' --output './schema.graphql'",
"gql:generate": "gql-tada generate output",
Expand Down
Loading
Loading