platformOS Community

I can't update file.graphql in public folder, physical_file_path is invalid!

tommyooc Dec 13 2021 at 05:28

Hi, I can't update file.graphql in public folder, the error code is "physical_file_path" invalid. I'm sure the physical_file_path was correct.

{"errors":[{"message":"GraphQL Error: Physical file path is invalid","locations":[{"line":3,"column":25}],"path":["graphql"],"extensions":{"messages":{"physical_file_path":"is invalid"},"codes":{"physical_file_path":[{"error":"invalid","value":"modules/_admin/public/graph_queries/webapp_populate_catalogs.graphql"}]}},"query":"update_file"}]}

I got the physical_file_path info via graphql query,

query list_gql {
  admin_graphql(
    per_page: 10000
    filter: {
      physical_file_path: {
        contains: "public"
      }
    }
  ) {
    results {
      id
    	physical_file_path
    }
  }
}

But I got an error when I used those path

mutation update_gql {
  admin_graphql_update(
    physical_file_path: "modules/_admin/public/graph_queries/webapp_populate_catalogs.graphql"
    graphql: {
      metadata: {
        parent_folder: "modules/_admin/public/graph_queries"
      }
    }
  ) {
    id
    physical_file_path
  }
}
Please sign in or fill up your profile to answer a question