Coder Social home page Coder Social logo

Comments (3)

ruiaraujo avatar ruiaraujo commented on September 7, 2024

I would definitely advise to update since there are quite a few bad bugs fixed in that version.

At Zalando, all the used queries used to be compiled at start-up so compiler performance was never a major concern. However, 1s for compilation is rather excessive specially when most of it is on the variable parsing.

Do you think you could share a query example that takes this amount of time?
If it is sensitive maybe, replace all term by Foo1, Foo2, etc. 😄

Maybe we would be able to spot something an easy win for compiler performance. Regardless, you will want to update to be ready for that fix. 😉

from graphql-jit.

Dylan-G-Roberts avatar Dylan-G-Roberts commented on September 7, 2024

Hey thanks Rui. I really purged this one, hopefully it's somewhat useful. RE: compiled at start-up, I think that could be a good option. I'll work on updating it :) as well. I'm a bit of a GraphQL n00b, any advice is very appreciated :).

{
  "foo": "FooBar",
  "bar": {
    "foo": "xxxx",
    "bar": "xxxx",
    "foo": "xxxx",
    "bar": {
      "foo": {
        "IN": ["xxxx"]
      },
      "bar": {
        "IN": ["xxxx"]
      },
      "OR": [
        {
          "foo": {
            "IN": ["xxxx"]
          },
          "bar": {
            "foo": {
              "IN": ["xxxx", "xxxx"]
            }
          },
          "foo": {
            "IN": ["xxxx", "xxxx", "xxxx", "xxxx", "xxxx", "xxxx"]
          }
        },
        {
          "bar": {
            "foo": {
              "NIN": ["xxxx", "xxxx"]
            }
          },
          "foo": {
            "IN": ["xxxx"]
          }
        }
      ]
    },
    "foo": {
      "bar": {
        "foo": "xxxx"
      }
    },
    "bar": {
      "bar": {
        "foo": {
          "NIN": ["xxxx", "xxxx"]
        }
      }
    },
    "foo": {
      "bar": {
        "foo": {
          "NIN": ["xxxx", "xxxx"]
        }
      }
    },
    "bar": "xxxx"
  },
  "foo": "foo FooBar($foo: Int!, $bar: foo, $foo: bar!, $bar: bar, $foo: Int, $bar: bar, $foo: Int!, $bar: bar, $foo: bar, $bar: bar!) {
  foo(
    foo: $foo
    bar: $bar
    foo: $foo
    bar: $bar
    foo: $foo
    foo: $foo
    bar: $bar
  ) {
    foo {
      foo
      __typename
    }
    bar {
      ...Fragment1
      __typename
    }
    foo {
      foo: bar
      bar: bar
      bar
      bar
      bar
      bar
      bar
      foo
      bar
      foo
      bar
      foo
      bar
      bar
      foo
      bar
      foo
      bar
      foo
      bar
      foo
      bar
      foo
      bar {
        foo
        __typename
      }
      foo: bar {
        ...Fragment2
        __typename
      }
      foo
      bar
      foo
      bar
      foo
      bar
      foo
      bar
      foo(
        bar: {foo: {EQ: xxxx}, bar: {EQ: xxxx}, foo: {IN: [\"xxxx\", \"xxxx\", \"xxxx\", \"xxxx\", \"xxxx\"]}, bar: {EQ: \"xxxx\"}}
      ) {
        foo {
          xxxx
          xxxx
          xxxx
          xxxx
          xxxx
          __typename
        }
        __typename
      }
      children: bar(bar: $bar) {
        foo {
          bar: bar
          foo: bar
          bar
          bar
          children: bar(bar: $foo) @include(if: $bar) {
            foo {
              bar: bar
              foo: bar
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      __typename
    }
    foo
    __typename
  }
}

fragment Fragment1 on bar {
  foo {
    foo {
      foo
      __typename
    }
    bar {
      foo
      __typename
    }
    __typename
  }
  __typename
}

fragment Fragment2 on bar {
  foo {
    bar: bar
    foo
    bar
    bar 
    foo
    foo
    bar
    foo
    __typename
  }
  __typename
}
"
}

from graphql-jit.

ruiaraujo avatar ruiaraujo commented on September 7, 2024

I was misunderstood here. I meant replacing the fields with consistent anonymized fields so we can reason about the schema. The less anonymized it is, the easier might be for us to understand. If you replacing a field named Customer with Foo then only Customer should be Foo

We cant make progress with your previous reply.

from graphql-jit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.