GithubHelp home page GithubHelp logo

titan-suite / ide-alpha Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 2.0 2.22 MB

IDE for Titan Suite

License: Apache License 2.0

HTML 3.81% JavaScript 0.43% TypeScript 95.04% CSS 0.72%
graphql typescript blockchain aion apollo titan-suite smart-contracts aionnetwork solidity nodejs

ide-alpha's People

Contributors

arjitkhullar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dhagell ben-haim

ide-alpha's Issues

Issue with solidity arrays when trying to deploy and interact with graphql playground

Contract code:

pragma solidity ^0.4.9;


contract ExampleTwo {
    struct Container {
        uint128[] arr;
    }  

    Container container = Container(new uint128[](0));

    function read() public returns(uint128[]) {
        return container.arr;
    }
    
    function write(uint128 item) public {
        container.arr.push(item);
    }

}

GraphQL:

query { 
  read{
    uint128Arr_0{
      int
      string
    }
  }
} 

At first I was not able to deploy, but restarting the server helped. Then once I deployed the contract when I try to query the read function I get the following error:

{
  "data": {
    "read": {
      "uint128Arr_0": null
    }
  },
  "errors": [
    {
      "message": "Expected Iterable, but did not find one for field read.uint128Arr_0.",
      "locations": [
        {
          "line": 3,
          "column": 5
        }
      ],
      "path": [
        "read",
        "uint128Arr_0"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "stacktrace": [
            "Error: Expected Iterable, but did not find one for field read.uint128Arr_0.",
            "    at invariant (/Users/ollie/Aion/server/node_modules/graphql/jsutils/invariant.js:19:11)",
            "    at completeListValue (/Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:673:65)",
            "    at completeValue (/Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:643:12)",
            "    at completeValueWithLocatedError (/Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:580:21)",
            "    at completeValueCatchingError (/Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:556:21)",
            "    at resolveField (/Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:497:10)",
            "    at /Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:364:18",
            "    at Array.reduce (<anonymous>)",
            "    at executeFields (/Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:361:42)",
            "    at collectAndExecuteSubfields (/Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:772:10)",
            "    at completeObjectValue (/Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:762:10)",
            "    at completeValue (/Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:660:12)",
            "    at /Users/ollie/Aion/server/node_modules/graphql/execution/execute.js:617:14",
            "    at <anonymous>",
            "    at process._tickDomainCallback (internal/process/next_tick.js:228:7)"
          ]
        }
      }
    }
  ]
}

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.