Skip to content

Split graphql query into chunks of 100#2

Merged
amineismail-google merged 2 commits into
google:mainfrom
jamesgol:batch_graphql
Jan 14, 2026
Merged

Split graphql query into chunks of 100#2
amineismail-google merged 2 commits into
google:mainfrom
jamesgol:batch_graphql

Conversation

@jamesgol
Copy link
Copy Markdown
Contributor

If you attempt to use this on an org with more than 100 objects the API returns an error and this causes a TypeError.

This patch splits the query into chunks of 100.

Traceback (most recent call last):

  File "aura-inspector/src/aura_cli.py", line 297, in <module>

    main()

    ~~~~^^

  File "aura-inspector/src/aura_cli.py", line 284, in main

    audit(url, cookies=cookies,

     ~~~~~^^^^^^^^^^^^^^^^^^^^^^

    object_list=object_list,

      ^^^^^^^^^^^^^^^^^^^^^^^^

    ...<7 lines>...

    no_gql=args.no_gql

      ^^^^^^^^^^^^^^^^^^

        )

        ^

  File "aura-inspector/src/aura_cli.py", line 65, in audit

    all_records_gql = aura.get_records_graphql(objects, records_per_action=100, fetch_all=False)

  File "aura-inspector/src/aura_helper.py", line 619, in get_records_graphql

    object_fields_map = self.get_graphql_fields_for_objects(objects)

  File "aura-inspector/src/aura_helper.py", line 536, in get_graphql_fields_for_objects

    objects_infos = filter(None, action_response.return_value['data']['uiapi']['objectInfos'])

TypeError: 'NoneType' object is not iterable

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Jan 13, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@amineismail-google
Copy link
Copy Markdown
Collaborator

Hello, thank you for the PR. It seems like this limit of 100 items in the apiNames argument was not present before and added recently, thank you for catching this.

@amineismail-google amineismail-google merged commit 16ab8ca into google:main Jan 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants