Skip to content

Commit

Permalink
[fix] Adapt VS Code extension to recent GraphQL Schema changes
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
  • Loading branch information
pcdavid authored and AxelRICHARD committed Mar 12, 2024
1 parent c4591a1 commit 1bbcd3e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
13 changes: 10 additions & 3 deletions vscode-extension/src/data/ProjectData.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022, 2023 Obeo.
* Copyright (c) 2022, 2024 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -62,7 +62,15 @@ export class ProjectData {
}
const payload = {
query: graphQLSubscription,
variables: { input: { id: uuid(), treeId: 'explorer://', editingContextId: this.id, expanded: expandedItems } },
variables: {
input: {
id: uuid(),
treeId: 'explorer://',
editingContextId: this.id,
expanded: expandedItems,
activeFilterIds: [],
},
},
};
const startMessage = { id: this.genSubscriptionTreeEventId(), type: 'start', payload };
const startMessageJSON = JSON.stringify(startMessage);
Expand Down Expand Up @@ -126,7 +134,6 @@ export class ProjectData {
const graphQLQuery = `
query getRepresentations($editingContextId: ID!) {
viewer {
id
editingContext(editingContextId: $editingContextId) {
id
representations {
Expand Down
9 changes: 4 additions & 5 deletions vscode-extension/src/data/ServerData.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022, 2023 Obeo.
* Copyright (c) 2022, 2024 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -51,10 +51,9 @@ export class ServerData {

private fetchProjects(): Promise<ProjectData[]> {
const graphQLQuery = `
query getProjects($page: Int!) {
query getProjects($page: Int!, $limit: Int!) {
viewer {
id
projects(page: $page) {
projects(page: $page, limit: $limit) {
edges {
node {
id
Expand All @@ -72,7 +71,7 @@ export class ServerData {
queryURL,
{
query: graphQLQuery,
variables: { page: 0 },
variables: { page: 0, limit: 50 },
},
headers
)
Expand Down

0 comments on commit 1bbcd3e

Please sign in to comment.