Skip to content

How to pass extra arguments while initial page load #1378

Answered by ghiscoding
lajith111 asked this question in Q&A
Discussion options

You must be logged in to vote

hello, I just saw this discussion, I'm not sure why I didn't see it earlier... but anyway extraQueryArguments is meant to be used for the entire time (like userId). These extra query arguments are carried for the entire time but I guess you could probably use regular JS code with a flag to reset it after the first load.

Maybe something along these lines

export MyComponent {
  isInitialLoad = true;
  graphqlService = new GraphqlService();

  prepareGrid() {
    const initialQueryArgs = {
      field: 'branchId',
      value: 123
    };

    this.gridOptions = {
      backendServiceApi: {
        service: this.graphqlService,
        preProcess: () => {
        },
        process: (query) => {

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lajith111
Comment options

Answer selected by ghiscoding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants