Skip to content

Commit

Permalink
Merge pull request #1034 from lens-protocol/quick-fix-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
juangm authored Dec 18, 2024
2 parents 38ef35c + 435f30f commit 3076094
Show file tree
Hide file tree
Showing 14 changed files with 336 additions and 152 deletions.
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

0 comments on commit 3076094

Please sign in to comment.