Browse Source

better way to fetch resolution

Sebastian Bittrich 2 years ago
parent
commit
449546828b
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/viewer/helpers/rscc/prop.ts
  2. 2 2
      src/viewer/helpers/rscc/resolution.gql.ts

+ 1 - 1
src/viewer/helpers/rscc/prop.ts

@@ -120,5 +120,5 @@ const DefaultBaseUrl = 'https://data.rcsb.org/graphql';
 async function fetchResolution(ctx: ThemeDataContext, model: Model, serverUrl: string): Promise<number> {
     const client = new GraphQLClient(serverUrl, ctx.assetManager);
     const result = await client.request(SyncRuntimeContext, resolution_gql, { entry_id: model.entryId });
-    return result.data.entry.refine[0].ls_d_res_high;
+    return result.data.entry.rcsb_entry_info.resolution_combined;
 }

+ 2 - 2
src/viewer/helpers/rscc/resolution.gql.ts

@@ -1,8 +1,8 @@
 export const resolution_gql = /* GraphQL */ `
 query Resolution($entry_id: String!) {
     entry(entry_id: $entry_id) {
-        refine {
-          ls_d_res_high
+        rcsb_entry_info {
+          resolution_combined
         }
     }
 }